"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserController = void 0;
const userService_1 = require("../services/userService");
class UserController {
    static async updateProfile(req, res) {
        if (!req.user) {
            res.status(401).json({ success: false, error: "Unauthorized" });
            return;
        }
        const data = req.body;
        const result = await userService_1.UserService.updateProfile(req.user.userId, data);
        res.status(result.success ? 200 : 400).json(result);
    }
}
exports.UserController = UserController;
