mirror of
https://github.com/ellmau/adf-obdd.git
synced 2025-12-20 09:39:38 +01:00
Enforce username and password to be set on login
This commit is contained in:
parent
257bd5cdfc
commit
b7fd34ee48
@ -155,6 +155,11 @@ async fn login(
|
||||
) -> impl Responder {
|
||||
let username = &user_data.username;
|
||||
let pw = &user_data.password;
|
||||
|
||||
if username.is_empty() || pw.is_empty() {
|
||||
return HttpResponse::BadRequest().body("Username and Password need to be set!");
|
||||
}
|
||||
|
||||
let user_coll: mongodb::Collection<User> = app_state
|
||||
.mongodb_client
|
||||
.database(DB_NAME)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user