Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-26 05:50:29 +01:00
v2022.9.2 expects a json response when registering
Dieser Commit ist enthalten in:
Ursprung
6fa6eb18e8
Commit
e50edcadfb
1 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
|
@ -81,7 +81,7 @@ fn enforce_password_hint_setting(password_hint: &Option<String>) -> EmptyResult
|
||||||
}
|
}
|
||||||
|
|
||||||
#[post("/accounts/register", data = "<data>")]
|
#[post("/accounts/register", data = "<data>")]
|
||||||
async fn register(data: JsonUpcase<RegisterData>, conn: DbConn) -> EmptyResult {
|
async fn register(data: JsonUpcase<RegisterData>, conn: DbConn) -> JsonResult {
|
||||||
let data: RegisterData = data.into_inner().data;
|
let data: RegisterData = data.into_inner().data;
|
||||||
let email = data.Email.to_lowercase();
|
let email = data.Email.to_lowercase();
|
||||||
|
|
||||||
|
@ -178,7 +178,10 @@ async fn register(data: JsonUpcase<RegisterData>, conn: DbConn) -> EmptyResult {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
user.save(&conn).await
|
user.save(&conn).await?;
|
||||||
|
Ok(Json(json!({
|
||||||
|
"registration": "success",
|
||||||
|
})))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/accounts/profile")]
|
#[get("/accounts/profile")]
|
||||||
|
|
Laden …
In neuem Issue referenzieren