fix(api): match UserDto with expected schema

the expected schema for `UserDto` is that `ageRestriction`
is either the age restriction object or is omitted.  this change
ensures that the DTO will drop the age restriction value instead
of serializing it as `null`
This commit is contained in:
James Ward 2026-04-22 21:35:18 -04:00
parent 4a7d9a6510
commit 36b773ae43
No known key found for this signature in database
GPG key ID: D335E3AE3B71D896

View file

@ -1,10 +1,12 @@
package org.gotson.komga.interfaces.api.rest.dto
import com.fasterxml.jackson.annotation.JsonInclude
import org.gotson.komga.domain.model.AgeRestriction
import org.gotson.komga.domain.model.AllowExclude
import org.gotson.komga.domain.model.KomgaUser
import org.gotson.komga.infrastructure.security.KomgaPrincipal
@JsonInclude(JsonInclude.Include.NON_NULL)
data class UserDto(
val id: String,
val email: String,