2022-05-03 17:44:13 +00:00
|
|
|
use crate::sensitive::Sensitive;
|
2021-10-16 13:33:38 +00:00
|
|
|
use lemmy_db_schema::newtypes::{CommunityId, PostId};
|
2021-01-18 21:57:31 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
2021-10-19 16:37:01 +00:00
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
2021-01-18 21:57:31 +00:00
|
|
|
pub struct UserJoin {
|
2021-12-06 14:54:47 +00:00
|
|
|
pub auth: Sensitive<String>,
|
2021-01-18 21:57:31 +00:00
|
|
|
}
|
|
|
|
|
2021-12-06 14:54:47 +00:00
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
2021-01-18 21:57:31 +00:00
|
|
|
pub struct UserJoinResponse {
|
|
|
|
pub joined: bool,
|
|
|
|
}
|
|
|
|
|
2021-10-19 16:37:01 +00:00
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
2021-01-18 21:57:31 +00:00
|
|
|
pub struct CommunityJoin {
|
2021-03-18 20:25:21 +00:00
|
|
|
pub community_id: CommunityId,
|
2021-01-18 21:57:31 +00:00
|
|
|
}
|
|
|
|
|
2021-12-06 14:54:47 +00:00
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
2021-01-18 21:57:31 +00:00
|
|
|
pub struct CommunityJoinResponse {
|
|
|
|
pub joined: bool,
|
|
|
|
}
|
|
|
|
|
2021-10-19 16:37:01 +00:00
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
2021-01-18 21:57:31 +00:00
|
|
|
pub struct ModJoin {
|
2021-03-18 20:25:21 +00:00
|
|
|
pub community_id: CommunityId,
|
2021-01-18 21:57:31 +00:00
|
|
|
}
|
|
|
|
|
2021-12-06 14:54:47 +00:00
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
2021-01-18 21:57:31 +00:00
|
|
|
pub struct ModJoinResponse {
|
|
|
|
pub joined: bool,
|
|
|
|
}
|
|
|
|
|
2021-10-19 16:37:01 +00:00
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
2021-01-18 21:57:31 +00:00
|
|
|
pub struct PostJoin {
|
2021-03-18 20:25:21 +00:00
|
|
|
pub post_id: PostId,
|
2021-01-18 21:57:31 +00:00
|
|
|
}
|
|
|
|
|
2021-12-06 14:54:47 +00:00
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
2021-01-18 21:57:31 +00:00
|
|
|
pub struct PostJoinResponse {
|
|
|
|
pub joined: bool,
|
|
|
|
}
|