clean order services
This commit is contained in:
@@ -68,5 +68,12 @@ export class UserService {
|
||||
return this.userRepository.findAllPaginated(dto)
|
||||
}
|
||||
|
||||
async findOrFail(userId: string) {
|
||||
const user = await this.findById(userId)
|
||||
if (!user) {
|
||||
throw new BadRequestException("User not found!")
|
||||
}
|
||||
return user
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user