Integrate RestaurantsModule into AdminModule; enhance AdminRepository to find admins by phone and restaurant slug using AdminRole; update AuthService to throw specific exception message when admin not found; correct last name in DatabaseSeeder for consistency.

This commit is contained in:
2025-11-19 00:00:48 +03:30
parent fdaa8b3dfd
commit e620dd6e04
4 changed files with 27 additions and 8 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ export class AuthService {
const admin = await this.adminRepository.findByPhoneAndRestaurantSlug(phone, slug);
if (!admin) {
throw new NotFoundException();
throw new NotFoundException(AuthMessage.ADMIN_NOT_FOUND);
}
const code = this.generateOtpCode();