diff --git a/src/dtos/user/user_dtos.rs b/src/dtos/user/user_dtos.rs index 3b89ad7..5417964 100644 --- a/src/dtos/user/user_dtos.rs +++ b/src/dtos/user/user_dtos.rs @@ -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 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()