Rename 'published' to 'public' (for recipe)
This commit is contained in:
parent
eaef6dc77e
commit
4f739593b8
20 changed files with 92 additions and 91 deletions
|
|
@ -226,16 +226,16 @@ pub fn setup_page(recipe_id: i64) {
|
|||
.forget();
|
||||
}
|
||||
|
||||
// Is published.
|
||||
// Is public.
|
||||
{
|
||||
let is_published: HtmlInputElement = by_id("input-is-published");
|
||||
EventListener::new(&is_published.clone(), "input", move |_event| {
|
||||
let body = ron_api::SetIsPublished {
|
||||
let is_public: HtmlInputElement = by_id("input-is-public");
|
||||
EventListener::new(&is_public.clone(), "input", move |_event| {
|
||||
let body = ron_api::SetIsPublic {
|
||||
recipe_id,
|
||||
is_published: is_published.checked(),
|
||||
is_public: is_public.checked(),
|
||||
};
|
||||
spawn_local(async move {
|
||||
let _ = request::patch::<(), _>("recipe/is_published", body).await;
|
||||
let _ = request::patch::<(), _>("recipe/is_public", body).await;
|
||||
reload_recipes_list(recipe_id).await;
|
||||
});
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue