feat: add sample endpoint to test JWT
This commit is contained in:
@@ -75,6 +75,16 @@ export class UserService {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a User by it's identifier.
|
||||
*
|
||||
* @param {number} id The identifier
|
||||
* @return {(Promise<User|null>)} User (or null if not found)
|
||||
*/
|
||||
async findById(id: number): Promise<User | null> {
|
||||
return await this.userRepo.findOneBy({id});
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts all the user entities in DB.
|
||||
* Used to tell whether the next created account should be an admin
|
||||
|
||||
Reference in New Issue
Block a user