diff --git a/src/dtos/user/user_dtos.rs b/src/dtos/user/user_dtos.rs index b061890..dbf2475 100644 --- a/src/dtos/user/user_dtos.rs +++ b/src/dtos/user/user_dtos.rs @@ -2,6 +2,7 @@ use serde::{Serialize, Deserialize}; #[derive(Serialize, Deserialize, Debug)] pub struct UserForCreationDto{ + #[serde(default = "get_default_app")] pub app: String, pub email: String, pub password: String, @@ -9,13 +10,19 @@ pub struct UserForCreationDto{ } #[derive(Serialize, Deserialize, Debug)] pub struct UserForLoginDto{ + #[serde(default = "get_default_app")] pub app: String, pub email: String, pub password: String } #[derive(Serialize, Deserialize, Debug)] pub struct UserForAuthenticationDto{ + #[serde(default = "get_default_app")] pub app: String, pub email: String, pub token: String +} + +fn get_default_app() -> String { + "deez".to_string() } \ No newline at end of file