Rights do not need to be checked when adding or removing scheduled recipe
This commit is contained in:
parent
40f14893b6
commit
746dbb3f1b
1 changed files with 0 additions and 4 deletions
|
|
@ -14,8 +14,6 @@ use crate::{
|
|||
translation::Sentence,
|
||||
};
|
||||
|
||||
use super::rights::*;
|
||||
|
||||
#[debug_handler]
|
||||
pub async fn get_scheduled_recipes(
|
||||
State(connection): State<db::Connection>,
|
||||
|
|
@ -53,7 +51,6 @@ pub async fn add_scheduled_recipe(
|
|||
Extension(context): Extension<Context>,
|
||||
ExtractRon(ron): ExtractRon<common::web_api::ScheduleRecipe>,
|
||||
) -> Result<Response> {
|
||||
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<Context>,
|
||||
ExtractRon(ron): ExtractRon<common::web_api::RemoveScheduledRecipe>,
|
||||
) -> Result<impl IntoResponse> {
|
||||
check_user_rights_recipe(&connection, &context.user, ron.recipe_id).await?;
|
||||
if let Some(user) = context.user {
|
||||
connection
|
||||
.rm_scheduled_recipe(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue