From 36b773ae438d03069a39d4f692104b2b9133c538 Mon Sep 17 00:00:00 2001 From: James Ward Date: Wed, 22 Apr 2026 21:35:18 -0400 Subject: [PATCH] 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` --- .../kotlin/org/gotson/komga/interfaces/api/rest/dto/UserDto.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/UserDto.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/UserDto.kt index ee425a30..026f9776 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/UserDto.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/UserDto.kt @@ -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,