import UserRepository from '../repository/UserRepository'

export default class {

    constructor(
        private userRepository : UserRepository
    ) {}

    async getAll() {
        return await this.userRepository.get();
    }

    async create(user : any) {
        return await this.userRepository.create(user);
    }

    async update(user : any) {
        return await this.userRepository.update(user);
    }


    async delete(taskId  : any) {
        return await this.userRepository.delete(taskId);
    }

    async get(id : any) {
        return await this.userRepository.getFirst({_id : id});
    }
}

