Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-16 04:12:53 +01:00
remove admin_path function
since it just returns a const
Dieser Commit ist enthalten in:
Ursprung
fc78b6f4b3
Commit
d627b02c5f
1 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
|
@ -125,9 +125,10 @@ impl<'r> FromRequest<'r> for IpHeader {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn admin_url(base_url: &str) -> String {
|
fn admin_url(base_url: &str) -> String {
|
||||||
format!("{}{}", base_url, admin_path())
|
format!("{}{}", base_url, ADMIN_PATH)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[derive(Responder)]
|
#[derive(Responder)]
|
||||||
enum AdminResponse {
|
enum AdminResponse {
|
||||||
#[response(status = 200)]
|
#[response(status = 200)]
|
||||||
|
@ -197,7 +198,7 @@ fn post_admin_login(data: Form<LoginForm>, cookies: &CookieJar<'_>, ip: ClientIp
|
||||||
|
|
||||||
cookies.add(cookie);
|
cookies.add(cookie);
|
||||||
if let Some(redirect) = redirect {
|
if let Some(redirect) = redirect {
|
||||||
Ok(Redirect::to(format!("{}{}", admin_path(), redirect)))
|
Ok(Redirect::to(format!("{}{}", ADMIN_PATH, redirect)))
|
||||||
} else {
|
} else {
|
||||||
Err(AdminResponse::Ok(render_admin_page()))
|
Err(AdminResponse::Ok(render_admin_page()))
|
||||||
}
|
}
|
||||||
|
|
Laden …
In neuem Issue referenzieren