mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-21 00:45:18 +00:00
Can create a comment
This commit is contained in:
@ -36,4 +36,5 @@ pub mod survey_choice_api;
|
||||
pub mod survey_api;
|
||||
pub mod comment_api;
|
||||
pub mod res_create_post;
|
||||
pub mod posts_targets_api;
|
||||
pub mod posts_targets_api;
|
||||
pub mod res_create_comment;
|
20
src/api_data/res_create_comment.rs
Normal file
20
src/api_data/res_create_comment.rs
Normal file
@ -0,0 +1,20 @@
|
||||
//! # Comment creation result
|
||||
//!
|
||||
//! @author Pierre Hubert
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[allow(non_snake_case)]
|
||||
pub struct ResCreateComment {
|
||||
success: bool,
|
||||
commentID: u64,
|
||||
}
|
||||
|
||||
impl ResCreateComment {
|
||||
pub fn new(comment_id: u64) -> ResCreateComment {
|
||||
ResCreateComment {
|
||||
success: true,
|
||||
commentID: comment_id,
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user