featwip: pretty departures
This commit is contained in:
parent
ef630b6d58
commit
4e1e05495d
13 changed files with 264 additions and 37 deletions
|
|
@ -118,6 +118,16 @@ fun Application.module() {
|
|||
else
|
||||
call.respond(HttpStatusCode.NotFound)
|
||||
}
|
||||
get("/routes/by_trip/{trip_id}") {
|
||||
val tripId = call.parameters["trip_id"]!!
|
||||
val route = withContext(context = Dispatchers.IO) {
|
||||
get<RouteDao>().getByTrip(tripId)
|
||||
}
|
||||
if (route != null)
|
||||
call.respond(route.asModel())
|
||||
else
|
||||
call.respond(HttpStatusCode.NotFound)
|
||||
}
|
||||
get("/stops") {
|
||||
val routes = withContext(context = Dispatchers.IO) {
|
||||
get<StopDao>().getAll()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue