mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
17 lines
456 B
TypeScript
17 lines
456 B
TypeScript
|
|
import { inject, injectable } from 'tsyringe';
|
||
|
|
import type { UsersRepository } from '../repositories/users.repository';
|
||
|
|
|
||
|
|
@injectable()
|
||
|
|
export class UsersService {
|
||
|
|
constructor(
|
||
|
|
@inject('UsersRepository') private readonly usersRepository: UsersRepository
|
||
|
|
) { }
|
||
|
|
|
||
|
|
async findOneByUsername(username: string) {
|
||
|
|
return this.usersRepository.findOneByUsername(username);
|
||
|
|
}
|
||
|
|
|
||
|
|
async findOneById(id: string) {
|
||
|
|
return this.usersRepository.findOneById(id);
|
||
|
|
}
|
||
|
|
}
|