Rename 'published' to 'public' (for recipe)
This commit is contained in:
parent
eaef6dc77e
commit
4f739593b8
20 changed files with 92 additions and 91 deletions
|
|
@ -152,14 +152,14 @@ pub async fn set_language(
|
|||
}
|
||||
|
||||
#[debug_handler]
|
||||
pub async fn set_is_published(
|
||||
pub async fn set_is_public(
|
||||
State(connection): State<db::Connection>,
|
||||
Extension(context): Extension<Context>,
|
||||
ExtractRon(ron): ExtractRon<ron_api::SetIsPublished>,
|
||||
ExtractRon(ron): ExtractRon<ron_api::SetIsPublic>,
|
||||
) -> Result<StatusCode> {
|
||||
check_user_rights_recipe(&connection, &context.user, ron.recipe_id).await?;
|
||||
connection
|
||||
.set_recipe_is_published(ron.recipe_id, ron.is_published)
|
||||
.set_recipe_is_public(ron.recipe_id, ron.is_public)
|
||||
.await?;
|
||||
Ok(StatusCode::OK)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue