This commit is contained in:
Pascal Engélibert 2023-05-02 18:03:21 +02:00
commit 9fe5d3c70e
45 changed files with 5311 additions and 815 deletions

34
common/src/api/queries.rs Normal file
View file

@ -0,0 +1,34 @@
use serde::{Deserialize, Serialize};
/*#[derive(Deserialize)]
pub struct Admin<T> {
pub admin_psw: String,
#[serde(flatten)]
pub query: T,
}*/
#[derive(Deserialize, Serialize)]
pub struct CommentsByTopic {
pub mutation_token: Option<String>,
pub topic: String,
}
#[derive(Deserialize, Serialize)]
pub struct CommentsByTopicAdmin {
pub admin_psw: String,
pub topic: String,
}
#[derive(Deserialize, Serialize)]
pub struct NewComment {
pub author: String,
pub email: String,
pub text: String,
pub topic: String,
}
#[derive(Deserialize, Serialize)]
pub struct RemoveCommentAdmin {
pub admin_psw: String,
pub comment_id: String,
}