fix(api): include Z in datetime formats

This commit is contained in:
Gauthier Roebroeck 2023-01-17 15:06:35 +08:00
parent a8746ca27d
commit bb7b7fd8f0
5 changed files with 20 additions and 20 deletions

View file

@ -11,7 +11,7 @@ data class AuthenticationActivityDto(
val userAgent: String?, val userAgent: String?,
val success: Boolean, val success: Boolean,
val error: String?, val error: String?,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val dateTime: LocalDateTime, val dateTime: LocalDateTime,
val source: String?, val source: String?,
) )

View file

@ -14,11 +14,11 @@ data class BookDto(
val name: String, val name: String,
val url: String, val url: String,
val number: Int, val number: Int,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val created: LocalDateTime, val created: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val lastModified: LocalDateTime, val lastModified: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val fileLastModified: LocalDateTime, val fileLastModified: LocalDateTime,
val sizeBytes: Long, val sizeBytes: Long,
val size: String = BinaryByteUnit.format(sizeBytes), val size: String = BinaryByteUnit.format(sizeBytes),
@ -60,19 +60,19 @@ data class BookMetadataDto(
val links: List<WebLinkDto>, val links: List<WebLinkDto>,
val linksLock: Boolean, val linksLock: Boolean,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val created: LocalDateTime, val created: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val lastModified: LocalDateTime, val lastModified: LocalDateTime,
) )
data class ReadProgressDto( data class ReadProgressDto(
val page: Int, val page: Int,
val completed: Boolean, val completed: Boolean,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val readDate: LocalDateTime, val readDate: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val created: LocalDateTime, val created: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val lastModified: LocalDateTime, val lastModified: LocalDateTime,
) )

View file

@ -12,9 +12,9 @@ data class CollectionDto(
val seriesIds: List<String>, val seriesIds: List<String>,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val createdDate: LocalDateTime, val createdDate: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val lastModifiedDate: LocalDateTime, val lastModifiedDate: LocalDateTime,
val filtered: Boolean, val filtered: Boolean,

View file

@ -12,9 +12,9 @@ data class ReadListDto(
val bookIds: List<String>, val bookIds: List<String>,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val createdDate: LocalDateTime, val createdDate: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val lastModifiedDate: LocalDateTime, val lastModifiedDate: LocalDateTime,
val filtered: Boolean, val filtered: Boolean,

View file

@ -9,11 +9,11 @@ data class SeriesDto(
val libraryId: String, val libraryId: String,
val name: String, val name: String,
val url: String, val url: String,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val created: LocalDateTime, val created: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val lastModified: LocalDateTime, val lastModified: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val fileLastModified: LocalDateTime, val fileLastModified: LocalDateTime,
val booksCount: Int, val booksCount: Int,
val booksReadCount: Int, val booksReadCount: Int,
@ -57,9 +57,9 @@ data class SeriesMetadataDto(
val alternateTitles: List<AlternateTitleDto>, val alternateTitles: List<AlternateTitleDto>,
val alternateTitlesLock: Boolean, val alternateTitlesLock: Boolean,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val created: LocalDateTime, val created: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val lastModified: LocalDateTime, val lastModified: LocalDateTime,
) )
@ -71,8 +71,8 @@ data class BookMetadataAggregationDto(
val summary: String, val summary: String,
val summaryNumber: String, val summaryNumber: String,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val created: LocalDateTime, val created: LocalDateTime,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val lastModified: LocalDateTime, val lastModified: LocalDateTime,
) )