Fix for non-200 responses
This commit is contained in:
parent
490f761661
commit
0d7d093e28
4
dist/immich.js
vendored
4
dist/immich.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "immich-public-proxy",
|
"name": "immich-public-proxy",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "ts-node src/index.ts",
|
"dev": "ts-node src/index.ts",
|
||||||
|
@ -31,7 +31,7 @@ class Immich {
|
|||||||
* The key is what is returned in the URL when you create a share in Immich.
|
* The key is what is returned in the URL when you create a share in Immich.
|
||||||
*/
|
*/
|
||||||
async getShareByKey (key: string) {
|
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) {
|
||||||
if (link.expiresAt && dayjs(link.expiresAt) < dayjs()) {
|
if (link.expiresAt && dayjs(link.expiresAt) < dayjs()) {
|
||||||
// This link has expired
|
// This link has expired
|
||||||
|
Loading…
Reference in New Issue
Block a user