This commit is contained in:
@@ -5,7 +5,5 @@ import java.time.LocalDate
|
||||
|
||||
data class ApiObject(
|
||||
@SerializedName("tag") val tag: String,
|
||||
@SerializedName("date") val date: LocalDate,
|
||||
@SerializedName("decision") val decision: Boolean,
|
||||
@SerializedName("confidence") val confidence: Double
|
||||
@SerializedName("probability") val probability: Double
|
||||
)
|
||||
@@ -24,13 +24,19 @@ class OutputServiceRDBServer() {
|
||||
}
|
||||
|
||||
get("/output/filter/negative") {
|
||||
val resultList = resultObjectService.getResultObjectbyDecision(false) ?: call.respond(HttpStatusCode.NotFound)
|
||||
val resultList = resultObjectService.getResultObjecLessthanProbability(0.5) ?: call.respond(HttpStatusCode.NotFound)
|
||||
|
||||
call.respond(resultList)
|
||||
}
|
||||
|
||||
get("/output/filter/positive") {
|
||||
val resultList = resultObjectService.getResultObjectbyDecision(true) ?: call.respond(HttpStatusCode.NotFound)
|
||||
val resultList = resultObjectService.getResultObjecGreaterthanProbability(0.5) ?: call.respond(HttpStatusCode.NotFound)
|
||||
|
||||
call.respond(resultList)
|
||||
}
|
||||
|
||||
get("/output/filter/undecided") {
|
||||
val resultList = resultObjectService.getResultObjecEqualsProbability(0.5) ?: call.respond(HttpStatusCode.NotFound)
|
||||
|
||||
call.respond(resultList)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user