From f852256d3f734129d663123050428ff7da5727bf Mon Sep 17 00:00:00 2001 From: spyesx Date: Tue, 28 Jul 2026 09:02:26 +0000 Subject: [PATCH] refactor(admin): return 503 status code when admin panel is disabled --- src/api/admin.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/admin.rs b/src/api/admin.rs index 7037bfb1..1a717f41 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -98,8 +98,11 @@ static CAN_BACKUP: LazyLock = LazyLock::new(|| ACTIVE_DB_TYPE.get().is_som static CAN_BACKUP: LazyLock = LazyLock::new(|| false); #[get("/")] -fn admin_disabled() -> &'static str { - "The admin panel is disabled, please configure the 'ADMIN_TOKEN' variable to enable it" +fn admin_disabled() -> (Status, &'static str) { + ( + Status::ServiceUnavailable, + "The admin panel is disabled, please configure the 'ADMIN_TOKEN' variable to enable it" + ) } const COOKIE_NAME: &str = "VW_ADMIN";