🐛 (user) fix user check password

This commit is contained in:
unknown
2025-07-01 00:55:25 +07:00
parent e7857e0384
commit 3ef7f1a249
7 changed files with 82 additions and 19 deletions

View File

@ -13,7 +13,10 @@ export const loginWithPasswordService = async (
) => {
try {
// search for user data using an identifier (username or email)
const userData = await findUserByEmailOrUsernameService(request.identifier);
const userData = await findUserByEmailOrUsernameService(
request.identifier,
{ verbose: true }
);
// if user data is not found, throw an error
if (!userData) throw new AppError(404, "User not found");