mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-31 05:51:14 +00:00
3053e14be7
* Derive default for api request structs, move type enums * Simplify api by using enum types directly, instead of string * Add default and clone for most api structs
44 lines
948 B
Rust
44 lines
948 B
Rust
use crate::sensitive::Sensitive;
|
|
use lemmy_db_schema::newtypes::{CommunityId, PostId};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
pub struct UserJoin {
|
|
pub auth: Sensitive<String>,
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
pub struct UserJoinResponse {
|
|
pub joined: bool,
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
pub struct CommunityJoin {
|
|
pub community_id: CommunityId,
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
pub struct CommunityJoinResponse {
|
|
pub joined: bool,
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
pub struct ModJoin {
|
|
pub community_id: CommunityId,
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
pub struct ModJoinResponse {
|
|
pub joined: bool,
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
pub struct PostJoin {
|
|
pub post_id: PostId,
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
pub struct PostJoinResponse {
|
|
pub joined: bool,
|
|
}
|