1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-09-25 22:29:45 +00:00

Can block the creation of new choices

This commit is contained in:
2020-07-10 12:03:11 +02:00
parent 715cfb0716
commit 6b0363935e
2 changed files with 11 additions and 0 deletions

View File

@@ -78,4 +78,13 @@ pub fn create_new_choice(r: &mut HttpRequestHandler) -> RequestResult {
}
r.success("Choice created")
}
/// Block the creation of new choices
pub fn block_new_choices_creation(r: &mut HttpRequestHandler) -> RequestResult {
let survey_id = r.post_survey_id_from_post_id("postID", PostAccessLevel::FULL_ACCESS)?;
survey_helper::block_new_choices_creation(survey_id)?;
r.success("")
}