]> Untitled Git - lemmy.git/blobdiff - crates/api_common/src/websocket.rs
Derive default for api request structs, move type enums (#2245)
[lemmy.git] / crates / api_common / src / websocket.rs
index 80729fcc70d96d86c2d068ce39c1d76e554a1a17..23f7b2bc5305187aa4110efb74e830bb84b4f51b 100644 (file)
@@ -2,7 +2,7 @@ use crate::sensitive::Sensitive;
 use lemmy_db_schema::newtypes::{CommunityId, PostId};
 use serde::{Deserialize, Serialize};
 
-#[derive(Serialize, Deserialize, Debug)]
+#[derive(Debug, Serialize, Deserialize, Clone)]
 pub struct UserJoin {
   pub auth: Sensitive<String>,
 }
@@ -12,7 +12,7 @@ pub struct UserJoinResponse {
   pub joined: bool,
 }
 
-#[derive(Serialize, Deserialize, Debug)]
+#[derive(Debug, Serialize, Deserialize, Clone)]
 pub struct CommunityJoin {
   pub community_id: CommunityId,
 }
@@ -22,7 +22,7 @@ pub struct CommunityJoinResponse {
   pub joined: bool,
 }
 
-#[derive(Serialize, Deserialize, Debug)]
+#[derive(Debug, Serialize, Deserialize, Clone)]
 pub struct ModJoin {
   pub community_id: CommunityId,
 }
@@ -32,7 +32,7 @@ pub struct ModJoinResponse {
   pub joined: bool,
 }
 
-#[derive(Serialize, Deserialize, Debug)]
+#[derive(Debug, Serialize, Deserialize, Clone)]
 pub struct PostJoin {
   pub post_id: PostId,
 }