mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: move getShareUrlPath to SharedLink class
This commit is contained in:
parent
e9fe6941d5
commit
71f6fe9f27
4 changed files with 8 additions and 12 deletions
|
|
@ -81,6 +81,11 @@ class SharedLink {
|
|||
? dto.assets[0].id
|
||||
: null;
|
||||
|
||||
String getShareUrlPath() {
|
||||
final slug = this.slug?.trim();
|
||||
return slug?.isNotEmpty == true ? 's/$slug' : 'share/$key';
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'SharedLink(id=$id, title=$title, thumbAssetId=$thumbAssetId, allowDownload=$allowDownload, allowUpload=$allowUpload, description=$description, password=$password, expiresAt=$expiresAt, key=$key, showMetadata=$showMetadata, slug=$slug, type=$type)';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue