diff --git a/src/main/kotlin/org/gitanimals/render/controller/PersonaController.kt b/src/main/kotlin/org/gitanimals/render/controller/PersonaController.kt index 5ad8e10..76c019a 100644 --- a/src/main/kotlin/org/gitanimals/render/controller/PersonaController.kt +++ b/src/main/kotlin/org/gitanimals/render/controller/PersonaController.kt @@ -29,7 +29,7 @@ class PersonaController( ): PersonaResponse { val persona = userFacade.getPersona(token, personaId) - return PersonaResponse(persona.id, persona.type, persona.level) + return PersonaResponse(persona.id, persona.type, persona.level, persona.visible) } @PatchMapping("/personas") @@ -47,7 +47,7 @@ class PersonaController( ): PersonaResponse { val persona = userFacade.addPersona(token, idempotencyKey, addPersonaRequest.name) - return PersonaResponse(persona.id, persona.type, persona.level) + return PersonaResponse(persona.id, persona.type, persona.level, persona.visible) } @DeleteMapping("/internals/personas") @@ -57,7 +57,7 @@ class PersonaController( ): PersonaResponse { val persona = userFacade.deletePersona(token, personaId) - return PersonaResponse(persona.id, persona.type, persona.level) + return PersonaResponse(persona.id, persona.type, persona.level, persona.visible) } @ExceptionHandler(IllegalArgumentException::class) diff --git a/src/main/kotlin/org/gitanimals/render/domain/response/PersonaResponse.kt b/src/main/kotlin/org/gitanimals/render/domain/response/PersonaResponse.kt index 281004a..e11a208 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/response/PersonaResponse.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/response/PersonaResponse.kt @@ -7,10 +7,11 @@ data class PersonaResponse( val id: String, val type: PersonaType, val level: String, + val visible: Boolean, ) { companion object { fun from(persona: Persona): PersonaResponse { - return PersonaResponse(persona.id.toString(), persona.type, persona.level.toString()) + return PersonaResponse(persona.id.toString(), persona.type, persona.level.toString(), persona.visible) } } }