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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user