Compare commits
2 commits
51ed36d6c3
...
746dbb3f1b
| Author | SHA1 | Date | |
|---|---|---|---|
| 746dbb3f1b | |||
| 40f14893b6 |
2 changed files with 0 additions and 7 deletions
|
|
@ -14,8 +14,6 @@ use crate::{
|
||||||
translation::Sentence,
|
translation::Sentence,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::rights::*;
|
|
||||||
|
|
||||||
#[debug_handler]
|
#[debug_handler]
|
||||||
pub async fn get_scheduled_recipes(
|
pub async fn get_scheduled_recipes(
|
||||||
State(connection): State<db::Connection>,
|
State(connection): State<db::Connection>,
|
||||||
|
|
@ -53,7 +51,6 @@ pub async fn add_scheduled_recipe(
|
||||||
Extension(context): Extension<Context>,
|
Extension(context): Extension<Context>,
|
||||||
ExtractRon(ron): ExtractRon<common::web_api::ScheduleRecipe>,
|
ExtractRon(ron): ExtractRon<common::web_api::ScheduleRecipe>,
|
||||||
) -> Result<Response> {
|
) -> Result<Response> {
|
||||||
check_user_rights_recipe(&connection, &context.user, ron.recipe_id).await?;
|
|
||||||
if let Some(user) = context.user {
|
if let Some(user) = context.user {
|
||||||
connection
|
connection
|
||||||
.add_scheduled_recipe(
|
.add_scheduled_recipe(
|
||||||
|
|
@ -79,7 +76,6 @@ pub async fn rm_scheduled_recipe(
|
||||||
Extension(context): Extension<Context>,
|
Extension(context): Extension<Context>,
|
||||||
ExtractRon(ron): ExtractRon<common::web_api::RemoveScheduledRecipe>,
|
ExtractRon(ron): ExtractRon<common::web_api::RemoveScheduledRecipe>,
|
||||||
) -> Result<impl IntoResponse> {
|
) -> Result<impl IntoResponse> {
|
||||||
check_user_rights_recipe(&connection, &context.user, ron.recipe_id).await?;
|
|
||||||
if let Some(user) = context.user {
|
if let Some(user) = context.user {
|
||||||
connection
|
connection
|
||||||
.rm_scheduled_recipe(
|
.rm_scheduled_recipe(
|
||||||
|
|
|
||||||
|
|
@ -285,8 +285,6 @@ fn display_month(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
gloo::console::log!(nb_of_weeks);
|
|
||||||
|
|
||||||
for i in 0..6 {
|
for i in 0..6 {
|
||||||
for j in 0..7 {
|
for j in 0..7 {
|
||||||
let day_element: Element = by_id(&format!("day-grid-{}{}", i, j));
|
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(" "));
|
day_element.set_class_name(&classes.join(" "));
|
||||||
} else {
|
} else {
|
||||||
gloo::console::log!("ok");
|
|
||||||
day_element.set_class_name("");
|
day_element.set_class_name("");
|
||||||
day_content.set_inner_html("");
|
day_content.set_inner_html("");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue