From b7e51772b898796c57b8ed9904bf8ffadc62971a Mon Sep 17 00:00:00 2001 From: devxb Date: Mon, 28 Oct 2024 22:02:17 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B0=B0=EA=B2=BD=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=EC=8B=9C=20=EC=96=B4=EB=96=A0=ED=95=9C=20=EB=B0=B0=EA=B2=BD?= =?UTF-8?q?=EB=8F=84=20=EC=97=86=EB=8B=A4=EB=A9=B4,=20WHITE=ED=95=84?= =?UTF-8?q?=EB=93=9C=EB=A5=BC=20=EC=9D=91=EB=8B=B5=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../render/controller/response/BackgroundResponse.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/gitanimals/render/controller/response/BackgroundResponse.kt b/src/main/kotlin/org/gitanimals/render/controller/response/BackgroundResponse.kt index 4a44730..77035c0 100644 --- a/src/main/kotlin/org/gitanimals/render/controller/response/BackgroundResponse.kt +++ b/src/main/kotlin/org/gitanimals/render/controller/response/BackgroundResponse.kt @@ -1,5 +1,6 @@ package org.gitanimals.render.controller.response +import org.gitanimals.render.domain.FieldType import org.gitanimals.render.domain.User data class BackgroundResponse( @@ -9,7 +10,7 @@ data class BackgroundResponse( ) { data class Background( - val type: String, + val type: FieldType, ) companion object { @@ -17,7 +18,9 @@ data class BackgroundResponse( return BackgroundResponse( id = user.id.toString(), name = user.name, - backgrounds = user.fields.map { Background(it.fieldType.toString()) }, + backgrounds = user.fields.map { Background(it.fieldType) }.ifEmpty { + listOf(Background(FieldType.WHITE_FIELD)) + }, ) } }