to do: auth functioning, now start building features
This commit is contained in:
5
server/db/sql/derived/setupbrowser.sql
Normal file
5
server/db/sql/derived/setupbrowser.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-- TO DO
|
||||||
|
-- run a query that selects:
|
||||||
|
-- 1) all recipes from a user's own collection
|
||||||
|
-- 2) all recipes from user's subscribed collections
|
||||||
|
-- 3) all matching a given user id
|
||||||
@@ -17,6 +17,14 @@ export class Recipe {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getAllByUserID(id: string) {
|
||||||
|
try {
|
||||||
|
// to do: use setupbrowser.sql to setup the recipe browser
|
||||||
|
} catch (e: any) {
|
||||||
|
throw new Error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async updateOneByID(id: string, data: IRecipe) {
|
async updateOneByID(id: string, data: IRecipe) {
|
||||||
const { name, description, preptime } = data;
|
const { name, description, preptime } = data;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user