Table Stuff

This commit is contained in:
2024-09-15 06:37:59 -04:00
parent 062a9adf04
commit 3794e30158
12 changed files with 128 additions and 152 deletions

View File

@@ -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;