1
0
Fork 1
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:
BlockListed 2023-09-09 18:08:42 +02:00
Ursprung fc78b6f4b3
Commit d627b02c5f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 2D204777C477B588

Datei anzeigen

@ -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()))
} }