From 40f14893b6cd009c5b3b2e7664adb8af4f582239 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Fri, 6 Jun 2025 22:51:07 +0200 Subject: [PATCH 1/2] Remove logging --- frontend/src/calendar.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/src/calendar.rs b/frontend/src/calendar.rs index dfb97d4..b2bd27c 100644 --- a/frontend/src/calendar.rs +++ b/frontend/src/calendar.rs @@ -285,8 +285,6 @@ fn display_month( } }; - gloo::console::log!(nb_of_weeks); - for i in 0..6 { for j in 0..7 { let day_element: Element = by_id(&format!("day-grid-{}{}", i, j)); @@ -310,7 +308,6 @@ fn display_month( day_element.set_class_name(&classes.join(" ")); } else { - gloo::console::log!("ok"); day_element.set_class_name(""); day_content.set_inner_html(""); } From 746dbb3f1b9b3a55343d73aa09f6e91515ae57b0 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Fri, 6 Jun 2025 22:54:43 +0200 Subject: [PATCH 2/2] Rights do not need to be checked when adding or removing scheduled recipe --- backend/src/services/ron/calendar.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/backend/src/services/ron/calendar.rs b/backend/src/services/ron/calendar.rs index 1f673c9..922128b 100644 --- a/backend/src/services/ron/calendar.rs +++ b/backend/src/services/ron/calendar.rs @@ -14,8 +14,6 @@ use crate::{ translation::Sentence, }; -use super::rights::*; - #[debug_handler] pub async fn get_scheduled_recipes( State(connection): State, @@ -53,7 +51,6 @@ pub async fn add_scheduled_recipe( Extension(context): Extension, ExtractRon(ron): ExtractRon, ) -> Result { - check_user_rights_recipe(&connection, &context.user, ron.recipe_id).await?; if let Some(user) = context.user { connection .add_scheduled_recipe( @@ -79,7 +76,6 @@ pub async fn rm_scheduled_recipe( Extension(context): Extension, ExtractRon(ron): ExtractRon, ) -> Result { - check_user_rights_recipe(&connection, &context.user, ron.recipe_id).await?; if let Some(user) = context.user { connection .rm_scheduled_recipe(