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)) + }, ) } }