Table Stuff
This commit is contained in:
1 parent
062a9adf04
commit
3794e30158
12 files changed
+128
-152
No files matched your search
@@ -46,7 +46,7 @@ export default class Recipes {
|
||||
mealType: recipe.mealType,
|
||||
instructions: recipe.instructions,
|
||||
ratingCount: 0,
|
||||
rating: 0
|
||||
rating: 0,
|
||||
}, this.upsert);
|
||||
return await this.get(Id);
|
||||
}
|
||||
@@ -56,8 +56,7 @@ export default class Recipes {
|
||||
}
|
||||
|
||||
async getAll(query) {
|
||||
let data = await this.model.find(query);
|
||||
return data
|
||||
return await this.model.find(query);
|
||||
}
|
||||
|
||||
async update(Id, data) {
|
||||
@@ -66,13 +65,6 @@ export default class Recipes {
|
||||
return await this.get(Id);
|
||||
}
|
||||
|
||||
async increment(Id, field, amount) {
|
||||
let result = await this.get(Id);
|
||||
if(!result) return null;
|
||||
|
||||
return await this.get(Id);
|
||||
}
|
||||
|
||||
async delete(Id) {
|
||||
let result = await this.get(Id);
|
||||
if(!result) return false;
|
||||
|
||||
Reference in new issue
Block a user