mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix(server,web): correctly remove metadata from shared links (#4464)
* wip: strip metadata * fix: authenticate time buckets * hide detail panel * fix tests * fix lint * add e2e tests * chore: open api * fix web compilation error * feat: test with asset with gps position * fix: only import fs.promises.cp * fix: cleanup mapasset * fix: format --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
4a9f58bf9b
commit
dadcf49eca
39 changed files with 332 additions and 150 deletions
14
mobile/openapi/lib/model/shared_link_create_dto.dart
generated
14
mobile/openapi/lib/model/shared_link_create_dto.dart
generated
|
|
@ -19,7 +19,7 @@ class SharedLinkCreateDto {
|
|||
this.assetIds = const [],
|
||||
this.description,
|
||||
this.expiresAt,
|
||||
this.showExif = true,
|
||||
this.showMetadata = true,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ class SharedLinkCreateDto {
|
|||
|
||||
DateTime? expiresAt;
|
||||
|
||||
bool showExif;
|
||||
bool showMetadata;
|
||||
|
||||
SharedLinkType type;
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ class SharedLinkCreateDto {
|
|||
other.assetIds == assetIds &&
|
||||
other.description == description &&
|
||||
other.expiresAt == expiresAt &&
|
||||
other.showExif == showExif &&
|
||||
other.showMetadata == showMetadata &&
|
||||
other.type == type;
|
||||
|
||||
@override
|
||||
|
|
@ -71,11 +71,11 @@ class SharedLinkCreateDto {
|
|||
(assetIds.hashCode) +
|
||||
(description == null ? 0 : description!.hashCode) +
|
||||
(expiresAt == null ? 0 : expiresAt!.hashCode) +
|
||||
(showExif.hashCode) +
|
||||
(showMetadata.hashCode) +
|
||||
(type.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SharedLinkCreateDto[albumId=$albumId, allowDownload=$allowDownload, allowUpload=$allowUpload, assetIds=$assetIds, description=$description, expiresAt=$expiresAt, showExif=$showExif, type=$type]';
|
||||
String toString() => 'SharedLinkCreateDto[albumId=$albumId, allowDownload=$allowDownload, allowUpload=$allowUpload, assetIds=$assetIds, description=$description, expiresAt=$expiresAt, showMetadata=$showMetadata, type=$type]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -97,7 +97,7 @@ class SharedLinkCreateDto {
|
|||
} else {
|
||||
// json[r'expiresAt'] = null;
|
||||
}
|
||||
json[r'showExif'] = this.showExif;
|
||||
json[r'showMetadata'] = this.showMetadata;
|
||||
json[r'type'] = this.type;
|
||||
return json;
|
||||
}
|
||||
|
|
@ -118,7 +118,7 @@ class SharedLinkCreateDto {
|
|||
: const [],
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
expiresAt: mapDateTime(json, r'expiresAt', ''),
|
||||
showExif: mapValueOfType<bool>(json, r'showExif') ?? true,
|
||||
showMetadata: mapValueOfType<bool>(json, r'showMetadata') ?? true,
|
||||
type: SharedLinkType.fromJson(json[r'type'])!,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue