summaryrefslogtreecommitdiffstats
path: root/src/routes/auth.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/auth.rs')
-rw-r--r--src/routes/auth.rs7
1 files changed, 6 insertions, 1 deletions
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<LoginCredentials>) -> Result<Json<AuthBody>, 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);