log page views
This commit is contained in:
parent
db8b20ee71
commit
2e7d9e6ba6
1 changed files with 2 additions and 0 deletions
|
@ -12,6 +12,7 @@ class RecipeModel {
|
|||
|
||||
async getAllRecipes(): Promise<any[]> {
|
||||
try {
|
||||
logger.info("index page view")
|
||||
return await this.prisma.recipes.findMany();
|
||||
} catch (err) {
|
||||
console.error("Error fetching all recipes:", err);
|
||||
|
@ -45,6 +46,7 @@ class RecipeModel {
|
|||
instruction: step.instruction,
|
||||
})),
|
||||
};
|
||||
logger.info("recipe page view", { recipe_id: data.details.id, recipe_name: data.details.name })
|
||||
return data;
|
||||
} catch (err) {
|
||||
console.log("Error finding recipe:", err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue