This commit is contained in:
		@@ -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)
 | 
			
		||||
                        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user