mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-27 15:59:21 +00:00
22 lines
432 B
Rust
22 lines
432 B
Rust
|
//! # Create a post result
|
||
|
//!
|
||
|
//! @author Pierre Hubert
|
||
|
use serde::Serialize;
|
||
|
|
||
|
#[derive(Serialize)]
|
||
|
#[allow(non_snake_case)]
|
||
|
pub struct ResCreatePost {
|
||
|
success: String,
|
||
|
postID: u64,
|
||
|
}
|
||
|
|
||
|
impl ResCreatePost {
|
||
|
/// Initialize a new structure
|
||
|
pub fn new(post_id: u64) -> ResCreatePost {
|
||
|
ResCreatePost {
|
||
|
success: "The post has been created!".to_string(),
|
||
|
postID: post_id,
|
||
|
}
|
||
|
}
|
||
|
}
|