Fix for non-200 responses

This commit is contained in:
Alan Grainger
2024-10-30 20:31:41 +01:00
parent 490f761661
commit 0d7d093e28
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ class Immich {
* The key is what is returned in the URL when you create a share in Immich.
*/
async getShareByKey (key: string) {
const link = (await this.request('/shared-links/me?key=' + encodeURIComponent(key)) || []) as SharedLink
const link = (await this.request('/shared-links/me?key=' + encodeURIComponent(key))) as SharedLink
if (link) {
if (link.expiresAt && dayjs(link.expiresAt) < dayjs()) {
// This link has expired