refactor(server): use date type for entities (#2602)

This commit is contained in:
Michel Heusschen 2023-05-30 15:15:56 +02:00 committed by GitHub
parent 3d505e425d
commit 789e3e3924
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 243 additions and 217 deletions

View file

@ -28,7 +28,7 @@ class EditSharedLinkDto {
///
String? description;
String? expiresAt;
DateTime? expiresAt;
///
/// Please note: This property should have been non-nullable! Since the specification file
@ -82,7 +82,7 @@ class EditSharedLinkDto {
// json[r'description'] = null;
}
if (this.expiresAt != null) {
json[r'expiresAt'] = this.expiresAt;
json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
} else {
// json[r'expiresAt'] = null;
}
@ -124,7 +124,7 @@ class EditSharedLinkDto {
return EditSharedLinkDto(
description: mapValueOfType<String>(json, r'description'),
expiresAt: mapValueOfType<String>(json, r'expiresAt'),
expiresAt: mapDateTime(json, r'expiresAt', ''),
allowUpload: mapValueOfType<bool>(json, r'allowUpload'),
allowDownload: mapValueOfType<bool>(json, r'allowDownload'),
showExif: mapValueOfType<bool>(json, r'showExif'),