Skip to content
Snippets Groups Projects
Select Git revision
  • 7956f09297cfe098dae33df3b8e5303421311f91
  • master default protected
  • radlaci97-master-patch-74780
  • blint
  • Balazs
  • Tomi
  • Mike
  • Blint-tmp
  • Patrik
  • w14
  • w13
  • w11
  • w10
  • w9
  • w7
  • w5
  • w6
  • w4
  • w3
  • w2
20 results

magic.sh

Blame
  • Forked from insert epic projlab name here / ProjLab
    Source project has a limited visibility.
    Routing.kt 671 B
    package space.rethelyi.web
    
    import io.ktor.application.*
    import io.ktor.response.*
    import io.ktor.routing.*
    import space.rethelyi.floors
    import space.rethelyi.model.toResponseV1
    import space.rethelyi.model.toResponseV2
    
    fun Application.configureRouting() {
        routing {
            get("/app") {
                call.respondRedirect("https://play.google.com/store/apps/details?id=space.rethelyi.mosogepsch")
            }
            get("/api/v2") {
                call.respond(mapOf("floors" to floors.map { it.value.toResponseV2() }))
            }
    
            get("/api/v1/laundry-room/") {
                call.respond(mapOf("floors" to floors.map { it.value.toResponseV1() }))
            }
        }
    }