diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/videos/shared/object-to-model-attributes.ts | 4 | ||||
-rw-r--r-- | server/lib/auth/tokens-cache.ts | 2 | ||||
-rw-r--r-- | server/lib/local-actor.ts | 2 | ||||
-rw-r--r-- | server/lib/video-tokens-manager.ts | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/activitypub/videos/shared/object-to-model-attributes.ts b/server/lib/activitypub/videos/shared/object-to-model-attributes.ts index 86699c5b8..8fd0a816c 100644 --- a/server/lib/activitypub/videos/shared/object-to-model-attributes.ts +++ b/server/lib/activitypub/videos/shared/object-to-model-attributes.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { maxBy, minBy } from 'lodash' | 1 | import { maxBy, minBy } from 'lodash' |
2 | import magnetUtil from 'magnet-uri' | 2 | import { decode as magnetUriDecode } from 'magnet-uri' |
3 | import { basename } from 'path' | 3 | import { basename } from 'path' |
4 | import { isAPVideoFileUrlMetadataObject } from '@server/helpers/custom-validators/activitypub/videos' | 4 | import { isAPVideoFileUrlMetadataObject } from '@server/helpers/custom-validators/activitypub/videos' |
5 | import { isVideoFileInfoHashValid } from '@server/helpers/custom-validators/videos' | 5 | import { isVideoFileInfoHashValid } from '@server/helpers/custom-validators/videos' |
@@ -62,7 +62,7 @@ function getFileAttributesFromUrl ( | |||
62 | 62 | ||
63 | if (!magnet) throw new Error('Cannot find associated magnet uri for file ' + fileUrl.href) | 63 | if (!magnet) throw new Error('Cannot find associated magnet uri for file ' + fileUrl.href) |
64 | 64 | ||
65 | const parsed = magnetUtil.decode(magnet.href) | 65 | const parsed = magnetUriDecode(magnet.href) |
66 | if (!parsed || isVideoFileInfoHashValid(parsed.infoHash) === false) { | 66 | if (!parsed || isVideoFileInfoHashValid(parsed.infoHash) === false) { |
67 | throw new Error('Cannot parse magnet URI ' + magnet.href) | 67 | throw new Error('Cannot parse magnet URI ' + magnet.href) |
68 | } | 68 | } |
diff --git a/server/lib/auth/tokens-cache.ts b/server/lib/auth/tokens-cache.ts index 43efc7d02..e7b12159b 100644 --- a/server/lib/auth/tokens-cache.ts +++ b/server/lib/auth/tokens-cache.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import LRUCache from 'lru-cache' | 1 | import { LRUCache } from 'lru-cache' |
2 | import { MOAuthTokenUser } from '@server/types/models' | 2 | import { MOAuthTokenUser } from '@server/types/models' |
3 | import { LRU_CACHE } from '../../initializers/constants' | 3 | import { LRU_CACHE } from '../../initializers/constants' |
4 | 4 | ||
diff --git a/server/lib/local-actor.ts b/server/lib/local-actor.ts index 8c10ed700..16dc265a3 100644 --- a/server/lib/local-actor.ts +++ b/server/lib/local-actor.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { remove } from 'fs-extra' | 1 | import { remove } from 'fs-extra' |
2 | import LRUCache from 'lru-cache' | 2 | import { LRUCache } from 'lru-cache' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { Transaction } from 'sequelize/types' | 4 | import { Transaction } from 'sequelize/types' |
5 | import { ActorModel } from '@server/models/actor/actor' | 5 | import { ActorModel } from '@server/models/actor/actor' |
diff --git a/server/lib/video-tokens-manager.ts b/server/lib/video-tokens-manager.ts index 17aa29cdd..660533528 100644 --- a/server/lib/video-tokens-manager.ts +++ b/server/lib/video-tokens-manager.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import LRUCache from 'lru-cache' | 1 | import { LRUCache } from 'lru-cache' |
2 | import { LRU_CACHE } from '@server/initializers/constants' | 2 | import { LRU_CACHE } from '@server/initializers/constants' |
3 | import { MUserAccountUrl } from '@server/types/models' | 3 | import { MUserAccountUrl } from '@server/types/models' |
4 | import { pick } from '@shared/core-utils' | 4 | import { pick } from '@shared/core-utils' |