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)