From 3a14419097ed710fb8b062d20078523c03b5b428 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sun, 25 Sep 2022 15:47:49 +0200 Subject: Edit user --- src/routes/auth.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/routes/auth.rs') diff --git a/src/routes/auth.rs b/src/routes/auth.rs index a7191e2..0c459f5 100644 --- a/src/routes/auth.rs +++ b/src/routes/auth.rs @@ -18,7 +18,12 @@ pub fn create_route() -> Router { /// Make login. Check if a user with the email and password passed in request body exists into the /// database async fn make_login(Json(payload): Json) -> Result, AppError> { - let user = User::new(String::new(), String::new(), payload.username, payload.password); + let user = User::new( + String::new(), + String::new(), + payload.username, + payload.password, + ); match User::find(user).await { Ok(user) => { let claims = Claims::new(user.id); -- cgit v1.2.3-71-g8e6c