Added UserAuthHeader

This commit is contained in:
Franklin 2023-01-24 16:56:36 -04:00
parent b14726c7e6
commit 400f705ead

View File

@ -28,6 +28,18 @@ pub struct UserForAuthenticationDto{
pub id: String,
pub token: String
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct UserAuthHeader{
pub id: String,
pub token: String
}
impl From<UserAuthHeader> for UserForAuthenticationDto {
fn from(value: UserAuthHeader) -> Self {
Self { app: get_default_app(), id: value.id, token: value.token }
}
}
fn get_default_app() -> String {
"deez".to_string()