diff --git a/server/db/sql/derived/setupbrowser.sql b/server/db/sql/derived/setupbrowser.sql new file mode 100644 index 0000000..e89de0b --- /dev/null +++ b/server/db/sql/derived/setupbrowser.sql @@ -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 \ No newline at end of file diff --git a/server/models/recipe.ts b/server/models/recipe.ts index 01e33bc..18739c9 100644 --- a/server/models/recipe.ts +++ b/server/models/recipe.ts @@ -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) { const { name, description, preptime } = data; try {