]> Untitled Git - lemmy.git/blob - crates/api_common/src/websocket.rs
Split api crate into api_structs and api
[lemmy.git] / crates / api_common / src / websocket.rs
1 use lemmy_db_schema::{CommunityId, PostId};
2 use serde::{Deserialize, Serialize};
3
4 #[derive(Deserialize, Debug)]
5 pub struct UserJoin {
6   pub auth: String,
7 }
8
9 #[derive(Serialize, Clone)]
10 pub struct UserJoinResponse {
11   pub joined: bool,
12 }
13
14 #[derive(Deserialize, Debug)]
15 pub struct CommunityJoin {
16   pub community_id: CommunityId,
17 }
18
19 #[derive(Serialize, Clone)]
20 pub struct CommunityJoinResponse {
21   pub joined: bool,
22 }
23
24 #[derive(Deserialize, Debug)]
25 pub struct ModJoin {
26   pub community_id: CommunityId,
27 }
28
29 #[derive(Serialize, Clone)]
30 pub struct ModJoinResponse {
31   pub joined: bool,
32 }
33
34 #[derive(Deserialize, Debug)]
35 pub struct PostJoin {
36   pub post_id: PostId,
37 }
38
39 #[derive(Serialize, Clone)]
40 pub struct PostJoinResponse {
41   pub joined: bool,
42 }