add db interaction layer
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-04-04 23:21:17 +02:00
parent 97b5923c1e
commit af4307c6a4
11 changed files with 158 additions and 425 deletions

View File

@ -4,8 +4,6 @@ import io.ktor.application.*
import io.ktor.response.*
import io.ktor.routing.*
import java.util.*
import io.ktor.swagger.experimental.*
import io.ktor.auth.*
import io.ktor.http.*
/**
@ -19,42 +17,43 @@ class OutputServiceRDBServer() {
*/
fun Routing.registerOutput() {
get("/output/filter/negative") {
if (false) httpException(HttpStatusCode.NotFound)
if (false) error(HttpStatusCode.NotFound)
call.respond(listOf())
}
get("/output/filter/positive") {
if (false) httpException(HttpStatusCode.NotFound)
if (false) error(HttpStatusCode.NotFound)
call.respond(listOf())
}
get("/output/after/{dateAfter}") {
val dateAfter = call.getPath<Date>("dateAfter")
val dateAfter = call.parameters["dateAfter"]
if (false) httpException(HttpStatusCode.NotFound)
if (false) error(HttpStatusCode.NotFound)
call.respond(listOf())
}
get("/output/before/{dateBefore}") {
val dateBefore = call.getPath<Date>("dateBefore")
val dateBefore = call.parameters["dateBefore"]
if (false) httpException(HttpStatusCode.NotFound)
if (false) error(HttpStatusCode.NotFound)
call.respond(listOf())
}
get("/output/{tagID}") {
val tagID = call.getPath<Int>("tagID")
val tagID = call.parameters["tagID"]
if (false) httpException(HttpStatusCode.NotFound)
if (false) error(HttpStatusCode.NotFound)
call.respond(OutputObject(
tag = "tag",
decison = false,
date = Date()
date = Date(),
confidence = 0.0
))
}
}