diff --git a/src/api/route/InputServiceServer.kt b/src/api/route/InputServiceServer.kt index 1c4e0a1..0636821 100644 --- a/src/api/route/InputServiceServer.kt +++ b/src/api/route/InputServiceServer.kt @@ -1,6 +1,7 @@ package com.kmalbz.api.route import com.google.gson.Gson +import com.google.gson.GsonBuilder import com.kmalbz.api.model.ApiObject import com.kmalbz.api.model.SampleObject import com.kmalbz.database.service.IInputObjectService @@ -64,6 +65,8 @@ class InputServiceServer { val queueName = channel.queueDeclare().queue channel.queueBind(queueName, rabbitExchangeName, "") + val gson = GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create() + get("/sample"){ call.respond(resultObjectService.getAllInputObjects()) } @@ -76,7 +79,6 @@ class InputServiceServer { when (part) { is PartData.FormItem -> { if (part.name == "description") { - val gson = Gson() print(part.value) description = gson.fromJson(part.value, SampleObject::class.java) }