From 27f2a08d779a1bb5133ce3cd2bda799f5b24389c Mon Sep 17 00:00:00 2001 From: Cilly Leang Date: Sun, 12 Apr 2026 00:31:41 +1000 Subject: [PATCH] feat(server): add fixup endpoint and move update endpoint --- .../kotlin/moe/lava/banksia/server/Application.kt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/server/src/main/kotlin/moe/lava/banksia/server/Application.kt b/server/src/main/kotlin/moe/lava/banksia/server/Application.kt index 91a9640..0981b80 100644 --- a/server/src/main/kotlin/moe/lava/banksia/server/Application.kt +++ b/server/src/main/kotlin/moe/lava/banksia/server/Application.kt @@ -56,7 +56,19 @@ fun Application.module() { get().addParentsToStops() } } - get("/update") { + get("/manage/fixup") { + val key = call.parameters["key"] + if (key != Constants.updateKey) { + call.respond(HttpStatusCode.Forbidden) + return@get + } + + call.respondText("fixing") + launch(context = Dispatchers.IO) { + get().addParentsToStops() + } + } + get("/manage/update") { val key = call.parameters["key"] if (key != Constants.updateKey) { call.respond(HttpStatusCode.Forbidden)