Implements User Authentication and Removes Failed ResourceGuard

This commit is contained in:
2024-02-24 23:42:41 -03:00
parent 077f69778f
commit ff0739573d
15 changed files with 668 additions and 115 deletions

View File

@@ -3,22 +3,22 @@ use chrono::NaiveDateTime;
use serde::{Deserialize, Serialize};
use serde_with::serde_as;
#[derive(Deserialize, Serialize)]
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct MessageAuthor {
name: String,
username: String,
email: String,
pub name: String,
pub username: String,
pub email: String,
}
#[serde_as]
#[derive(Deserialize, Serialize)]
#[derive(Deserialize, Serialize, Clone, Debug)]
pub struct SendMessage {
author: Option<MessageAuthor>,
pub author: Option<MessageAuthor>,
subject: String,
pub subject: String,
message: String,
pub message: String,
#[serde(deserialize_with = "from_ts")]
timestamp: NaiveDateTime,
pub timestamp: NaiveDateTime,
}