diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-27 14:32:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-27 15:12:22 +0200 |
commit | 41fb13c330de629df2d23379209e79c7af0f2e9a (patch) | |
tree | 73bc5a90566406b3910f142beae2a879c1e4265d /server/controllers/api/videos | |
parent | 40e7ed0714f96c01e16de3ac971a4b28116294e1 (diff) | |
download | PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.gz PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.zst PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.zip |
esModuleInterop to true
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r-- | server/controllers/api/videos/blacklist.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/captions.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/comment.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/import.ts | 10 | ||||
-rw-r--r-- | server/controllers/api/videos/index.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/live.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/ownership.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/rate.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/update.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/upload.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/watching.ts | 2 |
11 files changed, 15 insertions, 15 deletions
diff --git a/server/controllers/api/videos/blacklist.ts b/server/controllers/api/videos/blacklist.ts index 6bc768471..de65c74f1 100644 --- a/server/controllers/api/videos/blacklist.ts +++ b/server/controllers/api/videos/blacklist.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { blacklistVideo, unblacklistVideo } from '@server/lib/video-blacklist' | 2 | import { blacklistVideo, unblacklistVideo } from '@server/lib/video-blacklist' |
3 | import { UserRight, VideoBlacklistCreate } from '../../../../shared' | 3 | import { UserRight, VideoBlacklistCreate } from '../../../../shared' |
4 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 4 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
diff --git a/server/controllers/api/videos/captions.ts b/server/controllers/api/videos/captions.ts index 4008de60f..2d2213327 100644 --- a/server/controllers/api/videos/captions.ts +++ b/server/controllers/api/videos/captions.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { MVideoCaption } from '@server/types/models' | 2 | import { MVideoCaption } from '@server/types/models' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' | 4 | import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' |
diff --git a/server/controllers/api/videos/comment.ts b/server/controllers/api/videos/comment.ts index cb696f652..23bba9089 100644 --- a/server/controllers/api/videos/comment.ts +++ b/server/controllers/api/videos/comment.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { ResultList, ThreadsResultList, UserRight, VideoCommentCreate } from '../../../../shared/models' | 2 | import { ResultList, ThreadsResultList, UserRight, VideoCommentCreate } from '../../../../shared/models' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { VideoCommentThreads } from '../../../../shared/models/videos/comment/video-comment.model' | 4 | import { VideoCommentThreads } from '../../../../shared/models/videos/comment/video-comment.model' |
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts index de9a5308a..39fc57788 100644 --- a/server/controllers/api/videos/import.ts +++ b/server/controllers/api/videos/import.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { move, readFile } from 'fs-extra' | 2 | import { move, readFile } from 'fs-extra' |
3 | import * as magnetUtil from 'magnet-uri' | 3 | import { decode } from 'magnet-uri' |
4 | import * as parseTorrent from 'parse-torrent' | 4 | import parseTorrent, { Instance } from 'parse-torrent' |
5 | import { join } from 'path' | 5 | import { join } from 'path' |
6 | import { ServerConfigManager } from '@server/lib/server-config-manager' | 6 | import { ServerConfigManager } from '@server/lib/server-config-manager' |
7 | import { setVideoTags } from '@server/lib/video' | 7 | import { setVideoTags } from '@server/lib/video' |
@@ -329,7 +329,7 @@ async function processTorrentOrAbortRequest (req: express.Request, res: express. | |||
329 | torrentfile.path = newTorrentPath | 329 | torrentfile.path = newTorrentPath |
330 | 330 | ||
331 | const buf = await readFile(torrentfile.path) | 331 | const buf = await readFile(torrentfile.path) |
332 | const parsedTorrent = parseTorrent(buf) as parseTorrent.Instance | 332 | const parsedTorrent = parseTorrent(buf) as Instance |
333 | 333 | ||
334 | if (parsedTorrent.files.length !== 1) { | 334 | if (parsedTorrent.files.length !== 1) { |
335 | cleanUpReqFiles(req) | 335 | cleanUpReqFiles(req) |
@@ -349,7 +349,7 @@ async function processTorrentOrAbortRequest (req: express.Request, res: express. | |||
349 | 349 | ||
350 | function processMagnetURI (body: VideoImportCreate) { | 350 | function processMagnetURI (body: VideoImportCreate) { |
351 | const magnetUri = body.magnetUri | 351 | const magnetUri = body.magnetUri |
352 | const parsed = magnetUtil.decode(magnetUri) | 352 | const parsed = decode(magnetUri) |
353 | 353 | ||
354 | return { | 354 | return { |
355 | name: extractNameFromArray(parsed.name), | 355 | name: extractNameFromArray(parsed.name), |
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 10833d48b..c0c77f3f7 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import toInt from 'validator/lib/toInt' | 2 | import toInt from 'validator/lib/toInt' |
3 | import { pickCommonVideoQuery } from '@server/helpers/query' | 3 | import { pickCommonVideoQuery } from '@server/helpers/query' |
4 | import { doJSONRequest } from '@server/helpers/requests' | 4 | import { doJSONRequest } from '@server/helpers/requests' |
diff --git a/server/controllers/api/videos/live.ts b/server/controllers/api/videos/live.ts index 151ff354b..efafe64e9 100644 --- a/server/controllers/api/videos/live.ts +++ b/server/controllers/api/videos/live.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { createReqFiles } from '@server/helpers/express-utils' | 2 | import { createReqFiles } from '@server/helpers/express-utils' |
3 | import { buildUUID, uuidToShort } from '@server/helpers/uuid' | 3 | import { buildUUID, uuidToShort } from '@server/helpers/uuid' |
4 | import { CONFIG } from '@server/initializers/config' | 4 | import { CONFIG } from '@server/initializers/config' |
diff --git a/server/controllers/api/videos/ownership.ts b/server/controllers/api/videos/ownership.ts index f48acbc68..043861ac3 100644 --- a/server/controllers/api/videos/ownership.ts +++ b/server/controllers/api/videos/ownership.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { MVideoFullLight } from '@server/types/models' | 2 | import { MVideoFullLight } from '@server/types/models' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos' | 4 | import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos' |
diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts index 96f6cd886..c9cc16644 100644 --- a/server/controllers/api/videos/rate.ts +++ b/server/controllers/api/videos/rate.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { UserVideoRateUpdate } from '../../../../shared' | 2 | import { UserVideoRateUpdate } from '../../../../shared' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { logger } from '../../../helpers/logger' | 4 | import { logger } from '../../../helpers/logger' |
diff --git a/server/controllers/api/videos/update.ts b/server/controllers/api/videos/update.ts index 49639060b..a98a3e67c 100644 --- a/server/controllers/api/videos/update.ts +++ b/server/controllers/api/videos/update.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { Transaction } from 'sequelize/types' | 2 | import { Transaction } from 'sequelize/types' |
3 | import { changeVideoChannelShare } from '@server/lib/activitypub/share' | 3 | import { changeVideoChannelShare } from '@server/lib/activitypub/share' |
4 | import { buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' | 4 | import { buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' |
diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts index 5c740c041..7ffda749d 100644 --- a/server/controllers/api/videos/upload.ts +++ b/server/controllers/api/videos/upload.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { move } from 'fs-extra' | 2 | import { move } from 'fs-extra' |
3 | import { basename } from 'path' | 3 | import { basename } from 'path' |
4 | import { getLowercaseExtension } from '@server/helpers/core-utils' | 4 | import { getLowercaseExtension } from '@server/helpers/core-utils' |
diff --git a/server/controllers/api/videos/watching.ts b/server/controllers/api/videos/watching.ts index 05c75e543..e8c28b613 100644 --- a/server/controllers/api/videos/watching.ts +++ b/server/controllers/api/videos/watching.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { UserWatchingVideo } from '../../../../shared' | 2 | import { UserWatchingVideo } from '../../../../shared' |
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { | 4 | import { |