1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-21 00:45:18 +00:00

Delete all notifications about a post when making it private

This commit is contained in:
2021-01-25 18:46:14 +01:00
parent 608a85e7f5
commit c510e6abce
2 changed files with 6 additions and 3 deletions

View File

@ -403,7 +403,7 @@ pub fn allow_comments_on_post(p: &Post) -> ResultBoxError<bool> {
}
/// Set a new visibility level to a post
pub fn set_level(post_id: u64, level: PostVisibilityLevel) -> ResultBoxError {
pub fn set_level(post_id: u64, level: &PostVisibilityLevel) -> ResultBoxError {
database::UpdateInfo::new(POSTS_TABLE)
.cond_u64("ID", post_id)
.set_u32("niveau_visibilite", level.to_db())