fix login error

This commit is contained in:
yotakii
2026-03-05 11:54:14 +03:00
parent 69d3d21487
commit 8365f4da2d
3 changed files with 62 additions and 19 deletions

View File

@@ -21,8 +21,18 @@ export const authController = {
login: async (req: Request, res: Response) => {
try {
const { email, password } = req.body
if (!email || !password) {
return res.status(400).json({
success: false,
message: 'الرجاء إدخال البريد/اسم المستخدم وكلمة المرور'
})
}
const result = await authService.login(email, password)
res.status(200).json({
success: true,
message: 'تم تسجيل الدخول بنجاح',
@@ -94,4 +104,4 @@ export const authController = {
})
}
}
}
}