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 success: Boolean,
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 source: String?,
)

View File

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

View File

@ -12,9 +12,9 @@ data class CollectionDto(
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,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val lastModifiedDate: LocalDateTime,
val filtered: Boolean,

View File

@ -12,9 +12,9 @@ data class ReadListDto(
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,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")
val lastModifiedDate: LocalDateTime,
val filtered: Boolean,

View File

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