]> Untitled Git - lemmy.git/blob - crates/api_common/src/websocket.rs
Don't drop error context when adding a message to errors (#1958)
[lemmy.git] / crates / api_common / src / websocket.rs
1 use lemmy_db_schema::newtypes::{CommunityId, PostId};
2 use lemmy_utils::Sensitive;
3 use serde::{Deserialize, Serialize};
4
5 #[derive(Serialize, Deserialize, Debug)]
6 pub struct UserJoin {
7   pub auth: Sensitive<String>,
8 }
9
10 #[derive(Debug, Serialize, Deserialize, Clone)]
11 pub struct UserJoinResponse {
12   pub joined: bool,
13 }
14
15 #[derive(Serialize, Deserialize, Debug)]
16 pub struct CommunityJoin {
17   pub community_id: CommunityId,
18 }
19
20 #[derive(Debug, Serialize, Deserialize, Clone)]
21 pub struct CommunityJoinResponse {
22   pub joined: bool,
23 }
24
25 #[derive(Serialize, Deserialize, Debug)]
26 pub struct ModJoin {
27   pub community_id: CommunityId,
28 }
29
30 #[derive(Debug, Serialize, Deserialize, Clone)]
31 pub struct ModJoinResponse {
32   pub joined: bool,
33 }
34
35 #[derive(Serialize, Deserialize, Debug)]
36 pub struct PostJoin {
37   pub post_id: PostId,
38 }
39
40 #[derive(Debug, Serialize, Deserialize, Clone)]
41 pub struct PostJoinResponse {
42   pub joined: bool,
43 }