feat(api): update series sharing labels

This commit is contained in:
Gauthier Roebroeck 2022-02-25 16:38:06 +08:00
parent 562c57ccc8
commit 769b0e6a0c
2 changed files with 11 additions and 0 deletions

View file

@ -539,6 +539,10 @@ class SeriesController(
tagsLock = tagsLock ?: existing.tagsLock,
totalBookCount = if (isSet("totalBookCount")) totalBookCount else existing.totalBookCount,
totalBookCountLock = totalBookCountLock ?: existing.totalBookCountLock,
sharingLabels = if (isSet("sharingLabels")) {
if (sharingLabels != null) sharingLabels!! else emptySet()
} else existing.sharingLabels,
sharingLabelsLock = sharingLabelsLock ?: existing.sharingLabelsLock,
)
}
seriesMetadataRepository.update(updated)

View file

@ -74,4 +74,11 @@ class SeriesMetadataUpdateDto {
}
var totalBookCountLock: Boolean? = null
var sharingLabels: Set<String>?
by Delegates.observable(null) { prop, _, _ ->
isSet[prop.name] = true
}
var sharingLabelsLock: Boolean? = null
}