"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthController = void 0;
const authService_js_1 = require("../services/authService.js");
class AuthController {
    static async register(req, res) {
        const data = req.body;
        const result = await authService_js_1.AuthService.register(data);
        res.status(result.success ? 201 : 400).json(result);
    }
    static async login(req, res) {
        const data = req.body;
        const result = await authService_js_1.AuthService.login(data);
        res.status(result.success ? 200 : 400).json(result);
    }
}
exports.AuthController = AuthController;
