]> Untitled Git - lemmy.git/blobdiff - crates/api_common/src/person.rs
Adding GetUnreadCount to the API. Fixes #1794 (#1842)
[lemmy.git] / crates / api_common / src / person.rs
index 2dd9953b778b56cf0a41eeb143377646de9d7c53..af7212bac078d8c89c5088d807480a6f3fee89e3 100644 (file)
@@ -266,3 +266,15 @@ pub struct GetReportCountResponse {
   pub comment_reports: i64,
   pub post_reports: i64,
 }
+
+#[derive(Deserialize)]
+pub struct GetUnreadCount {
+  pub auth: String,
+}
+
+#[derive(Serialize, Clone)]
+pub struct GetUnreadCountResponse {
+  pub replies: i64,
+  pub mentions: i64,
+  pub private_messages: i64,
+}