import { User } from './user' ; import { UserRepository } from './userRepository' ; export class UsersService { constructor ( private readonly userRepository ) { } async getAllUsers ( ) { const users = await this . userRepository . getAll ( ) ; return users ; } async createUser ( firstName , lastName , age ) { return this . userRepository . add ( firstName , lastName , age ) ; } }