use my own gson
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Torma Kristóf 2020-05-22 00:23:50 +02:00
parent 4edd409cc8
commit 1bb96f90a1
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
1 changed files with 3 additions and 1 deletions

View File

@ -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)
}