Compare commits

...

2 Commits

Author SHA1 Message Date
83eeb97d2f upload to docker hub
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-31 23:17:31 +01:00
b0fadd63d6 fix type mismatch
All checks were successful
continuous-integration/drone/push Build is passing
2021-08-18 15:49:07 +02:00
2 changed files with 15 additions and 6 deletions

View File

@ -30,6 +30,18 @@ steps:
- latest
- ${DRONE_BUILD_NUMBER}
- name: dockerhub
image: plugins/docker
settings:
repo: birbnetes/${DRONE_REPO_NAME}
username:
from_secret: DOCKERHUB_USER
password:
from_secret: DOCKERHUB_PASSWORD
tags:
- latest
- ${DRONE_BUILD_NUMBER}
- name: ms-teams
image: kuperiu/drone-teams
settings:

View File

@ -6,9 +6,8 @@ import io.ktor.http.HttpStatusCode
import io.ktor.response.respond
import io.ktor.routing.Routing
import io.ktor.routing.get
import kotlinx.datetime.LocalDateTime
import org.koin.ktor.ext.inject
import java.time.LocalDate
import java.time.format.DateTimeFormatter
/**
* Sample Service
@ -43,8 +42,7 @@ class SampleServiceServer {
get("/sample/after/{dateAfter}") {
val dateAfter = call.parameters["dateAfter"] ?: error(HttpStatusCode.NotAcceptable)
val dateTimeFormatter: DateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE
val localDateAfter : LocalDate = LocalDate.parse(dateAfter,dateTimeFormatter)
val localDateAfter : LocalDateTime = LocalDateTime.parse(dateAfter)
val resultList = sampleObjectService.getSampleObjectafterDate(localDateAfter)
call.respond(resultList)
@ -52,8 +50,7 @@ class SampleServiceServer {
get("/sample/before/{dateBefore}") {
val dateAfter = call.parameters["dateBefore"] ?: error(HttpStatusCode.NotAcceptable)
val dateTimeFormatter: DateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE
val localDateBefore : LocalDate = LocalDate.parse(dateAfter,dateTimeFormatter)
val localDateBefore : LocalDateTime = LocalDateTime.parse(dateAfter)
val resultList = sampleObjectService.getSampleObjectbeforeDate(localDateBefore)
call.respond(resultList)