Skip to content

Instantly share code, notes, and snippets.

@LucasBadico
Created October 14, 2019 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LucasBadico/4583d49b40ec040f9cb7f6ab06b5a967 to your computer and use it in GitHub Desktop.
Save LucasBadico/4583d49b40ec040f9cb7f6ab06b5a967 to your computer and use it in GitHub Desktop.
create method on serviço
export default class GarageService {
constructor(garageRepo) {
this.repository = garageRepo;
}
async create(data) {
return this.repository.create({
...data,
id: 'mockid'
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment