Skip to content

Commit

Permalink
release: 0.5.0 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb authored May 12, 2024
2 parents b355b39 + 6ab132a commit 2b62762
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

0 comments on commit 2b62762

Please sign in to comment.