import FileRepository from '../repository/FileRepository'

export default class {

    constructor(
        private fileRepository : FileRepository
    ) {}

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

    async create(file : any) {
        return await this.fileRepository.create(file);
    }

    async update(file : any) {
        return await this.fileRepository.update(file);
    }

    async delete(id : any) {
        return await this.fileRepository.delete(id);
    }

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

