From cb47b67dc6d975c672b3f1a879bf6a92338a7184 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 9 Jul 2020 09:17:28 +0200 Subject: [PATCH] Fix visibility level when creating new posts --- src/controllers/posts_controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/posts_controller.rs b/src/controllers/posts_controller.rs index 8bd1178..6355ef8 100644 --- a/src/controllers/posts_controller.rs +++ b/src/controllers/posts_controller.rs @@ -114,7 +114,7 @@ pub fn create_post(r: &mut HttpRequestHandler) -> RequestResult { time_create: time(), target_page, content: Some(r.post_string_opt("content", 0, false)?), - visibility: PostVisibilityLevel::VISIBILITY_PUBLIC, // TODO : fix + visibility: PostVisibilityLevel::from_api(&r.post_string("visibility")?), kind: PostKind::POST_KIND_TEXT, };