Skip to content

Commit

Permalink
本番構築テスト用エンドポイントを作成
Browse files Browse the repository at this point in the history
  • Loading branch information
bvlion committed Feb 6, 2021
1 parent 804db3a commit 8a9a012
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/etc/EtcController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ class EtcController {
EtcDao.Faq.select { EtcDao.Faq.id eq 1 }
}

fun getTimeOnly() = Util.datetimeFormat(null)

data class OgpGet(val url: String?)
}
9 changes: 8 additions & 1 deletion src/etc/EtcRouter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import org.koin.ktor.ext.inject
object EtcRouter {
fun Routing.index() {
val controller: EtcController by inject()

route("/test") {
get {
call.respond(controller.getTimeOnly())
}
}

route("/") {
get {
call.respond(transaction { controller.getTime() })
Expand Down Expand Up @@ -37,4 +44,4 @@ object EtcRouter {
}
}
}
}
}

0 comments on commit 8a9a012

Please sign in to comment.