feat(server): add fixup endpoint and move update endpoint
This commit is contained in:
parent
38bcdc54bc
commit
27f2a08d77
1 changed files with 13 additions and 1 deletions
|
|
@ -56,7 +56,19 @@ fun Application.module() {
|
|||
get<GtfsDataFixer>().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<GtfsDataFixer>().addParentsToStops()
|
||||
}
|
||||
}
|
||||
get("/manage/update") {
|
||||
val key = call.parameters["key"]
|
||||
if (key != Constants.updateKey) {
|
||||
call.respond(HttpStatusCode.Forbidden)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue