diff options
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 | 8 | ||||
-rw-r--r-- | server/controllers/api/videos/index.ts | 18 | ||||
-rw-r--r-- | server/controllers/api/videos/live.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/ownership.ts | 14 | ||||
-rw-r--r-- | server/controllers/api/videos/rate.ts | 4 | ||||
-rw-r--r-- | server/controllers/api/videos/update.ts | 4 | ||||
-rw-r--r-- | server/controllers/api/videos/upload.ts | 18 | ||||
-rw-r--r-- | server/controllers/api/videos/watching.ts | 2 |
10 files changed, 34 insertions, 40 deletions
diff --git a/server/controllers/api/videos/blacklist.ts b/server/controllers/api/videos/blacklist.ts index 530e17965..6bc768471 100644 --- a/server/controllers/api/videos/blacklist.ts +++ b/server/controllers/api/videos/blacklist.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import * as express from 'express' | 1 | import * as 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 { logger } from '../../../helpers/logger' | 5 | import { logger } from '../../../helpers/logger' |
5 | import { getFormattedObjects } from '../../../helpers/utils' | 6 | import { getFormattedObjects } from '../../../helpers/utils' |
6 | import { sequelizeTypescript } from '../../../initializers/database' | 7 | import { sequelizeTypescript } from '../../../initializers/database' |
@@ -19,7 +20,6 @@ import { | |||
19 | videosBlacklistUpdateValidator | 20 | videosBlacklistUpdateValidator |
20 | } from '../../../middlewares' | 21 | } from '../../../middlewares' |
21 | import { VideoBlacklistModel } from '../../../models/video/video-blacklist' | 22 | import { VideoBlacklistModel } from '../../../models/video/video-blacklist' |
22 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
23 | 23 | ||
24 | const blacklistRouter = express.Router() | 24 | const blacklistRouter = express.Router() |
25 | 25 | ||
diff --git a/server/controllers/api/videos/captions.ts b/server/controllers/api/videos/captions.ts index ad7423a31..4008de60f 100644 --- a/server/controllers/api/videos/captions.ts +++ b/server/controllers/api/videos/captions.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { MVideoCaption } from '@server/types/models' | 2 | import { MVideoCaption } from '@server/types/models' |
3 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/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' |
5 | import { createReqFiles } from '../../../helpers/express-utils' | 5 | import { createReqFiles } from '../../../helpers/express-utils' |
6 | import { logger } from '../../../helpers/logger' | 6 | import { logger } from '../../../helpers/logger' |
diff --git a/server/controllers/api/videos/comment.ts b/server/controllers/api/videos/comment.ts index e6f28c1cb..cb696f652 100644 --- a/server/controllers/api/videos/comment.ts +++ b/server/controllers/api/videos/comment.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | 2 | import { ResultList, ThreadsResultList, UserRight, VideoCommentCreate } from '../../../../shared/models' |
3 | import { ResultList, ThreadsResultList, UserRight } from '../../../../shared/models' | 3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
4 | import { VideoCommentCreate } from '../../../../shared/models/videos/comment/video-comment.model' | 4 | import { VideoCommentThreads } from '../../../../shared/models/videos/comment/video-comment.model' |
5 | import { auditLoggerFactory, CommentAuditView, getAuditIdFromRes } from '../../../helpers/audit-logger' | 5 | import { auditLoggerFactory, CommentAuditView, getAuditIdFromRes } from '../../../helpers/audit-logger' |
6 | import { getFormattedObjects } from '../../../helpers/utils' | 6 | import { getFormattedObjects } from '../../../helpers/utils' |
7 | import { sequelizeTypescript } from '../../../initializers/database' | 7 | import { sequelizeTypescript } from '../../../initializers/database' |
@@ -136,7 +136,7 @@ async function listVideoThreads (req: express.Request, res: express.Response) { | |||
136 | return res.json({ | 136 | return res.json({ |
137 | ...getFormattedObjects(resultList.data, resultList.total), | 137 | ...getFormattedObjects(resultList.data, resultList.total), |
138 | totalNotDeletedComments: resultList.totalNotDeletedComments | 138 | totalNotDeletedComments: resultList.totalNotDeletedComments |
139 | }) | 139 | } as VideoCommentThreads) |
140 | } | 140 | } |
141 | 141 | ||
142 | async function listVideoThreadComments (req: express.Request, res: express.Response) { | 142 | async function listVideoThreadComments (req: express.Request, res: express.Response) { |
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 74b100e59..49490f79b 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -1,12 +1,12 @@ | |||
1 | import * as express from 'express' | 1 | import * as 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 { doJSONRequest } from '@server/helpers/requests' | 4 | import { doJSONRequest } from '@server/helpers/requests' |
4 | import { LiveManager } from '@server/lib/live' | 5 | import { LiveManager } from '@server/lib/live' |
5 | import { openapiOperationDoc } from '@server/middlewares/doc' | 6 | import { openapiOperationDoc } from '@server/middlewares/doc' |
6 | import { getServerActor } from '@server/models/application/application' | 7 | import { getServerActor } from '@server/models/application/application' |
7 | import { MVideoAccountLight } from '@server/types/models' | 8 | import { MVideoAccountLight } from '@server/types/models' |
8 | import { VideosCommonQuery } from '../../../../shared' | 9 | import { HttpStatusCode } from '../../../../shared/models' |
9 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs' | ||
10 | import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger' | 10 | import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger' |
11 | import { buildNSFWFilter, getCountVideos } from '../../../helpers/express-utils' | 11 | import { buildNSFWFilter, getCountVideos } from '../../../helpers/express-utils' |
12 | import { logger } from '../../../helpers/logger' | 12 | import { logger } from '../../../helpers/logger' |
@@ -211,22 +211,14 @@ async function getVideoFileMetadata (req: express.Request, res: express.Response | |||
211 | } | 211 | } |
212 | 212 | ||
213 | async function listVideos (req: express.Request, res: express.Response) { | 213 | async function listVideos (req: express.Request, res: express.Response) { |
214 | const query = req.query as VideosCommonQuery | 214 | const query = pickCommonVideoQuery(req.query) |
215 | const countVideos = getCountVideos(req) | 215 | const countVideos = getCountVideos(req) |
216 | 216 | ||
217 | const apiOptions = await Hooks.wrapObject({ | 217 | const apiOptions = await Hooks.wrapObject({ |
218 | start: query.start, | 218 | ...query, |
219 | count: query.count, | 219 | |
220 | sort: query.sort, | ||
221 | includeLocalVideos: true, | 220 | includeLocalVideos: true, |
222 | categoryOneOf: query.categoryOneOf, | ||
223 | licenceOneOf: query.licenceOneOf, | ||
224 | languageOneOf: query.languageOneOf, | ||
225 | tagsOneOf: query.tagsOneOf, | ||
226 | tagsAllOf: query.tagsAllOf, | ||
227 | nsfw: buildNSFWFilter(res, query.nsfw), | 221 | nsfw: buildNSFWFilter(res, query.nsfw), |
228 | isLive: query.isLive, | ||
229 | filter: query.filter, | ||
230 | withFiles: false, | 222 | withFiles: false, |
231 | user: res.locals.oauth ? res.locals.oauth.token.User : undefined, | 223 | user: res.locals.oauth ? res.locals.oauth.token.User : undefined, |
232 | countVideos | 224 | countVideos |
diff --git a/server/controllers/api/videos/live.ts b/server/controllers/api/videos/live.ts index d8c51c2d4..ed4da8f47 100644 --- a/server/controllers/api/videos/live.ts +++ b/server/controllers/api/videos/live.ts | |||
@@ -11,7 +11,7 @@ import { videoLiveAddValidator, videoLiveGetValidator, videoLiveUpdateValidator | |||
11 | import { VideoLiveModel } from '@server/models/video/video-live' | 11 | import { VideoLiveModel } from '@server/models/video/video-live' |
12 | import { MVideoDetails, MVideoFullLight } from '@server/types/models' | 12 | import { MVideoDetails, MVideoFullLight } from '@server/types/models' |
13 | import { LiveVideoCreate, LiveVideoUpdate, VideoState } from '../../../../shared' | 13 | import { LiveVideoCreate, LiveVideoUpdate, VideoState } from '../../../../shared' |
14 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | 14 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
15 | import { logger } from '../../../helpers/logger' | 15 | import { logger } from '../../../helpers/logger' |
16 | import { sequelizeTypescript } from '../../../initializers/database' | 16 | import { sequelizeTypescript } from '../../../initializers/database' |
17 | import { updateVideoMiniatureFromExisting } from '../../../lib/thumbnail' | 17 | import { updateVideoMiniatureFromExisting } from '../../../lib/thumbnail' |
diff --git a/server/controllers/api/videos/ownership.ts b/server/controllers/api/videos/ownership.ts index 1bb96e046..f48acbc68 100644 --- a/server/controllers/api/videos/ownership.ts +++ b/server/controllers/api/videos/ownership.ts | |||
@@ -1,6 +1,12 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { MVideoFullLight } from '@server/types/models' | ||
3 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | ||
4 | import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos' | ||
2 | import { logger } from '../../../helpers/logger' | 5 | import { logger } from '../../../helpers/logger' |
6 | import { getFormattedObjects } from '../../../helpers/utils' | ||
3 | import { sequelizeTypescript } from '../../../initializers/database' | 7 | import { sequelizeTypescript } from '../../../initializers/database' |
8 | import { sendUpdateVideo } from '../../../lib/activitypub/send' | ||
9 | import { changeVideoChannelShare } from '../../../lib/activitypub/share' | ||
4 | import { | 10 | import { |
5 | asyncMiddleware, | 11 | asyncMiddleware, |
6 | asyncRetryTransactionMiddleware, | 12 | asyncRetryTransactionMiddleware, |
@@ -11,15 +17,9 @@ import { | |||
11 | videosChangeOwnershipValidator, | 17 | videosChangeOwnershipValidator, |
12 | videosTerminateChangeOwnershipValidator | 18 | videosTerminateChangeOwnershipValidator |
13 | } from '../../../middlewares' | 19 | } from '../../../middlewares' |
20 | import { VideoModel } from '../../../models/video/video' | ||
14 | import { VideoChangeOwnershipModel } from '../../../models/video/video-change-ownership' | 21 | import { VideoChangeOwnershipModel } from '../../../models/video/video-change-ownership' |
15 | import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos' | ||
16 | import { VideoChannelModel } from '../../../models/video/video-channel' | 22 | import { VideoChannelModel } from '../../../models/video/video-channel' |
17 | import { getFormattedObjects } from '../../../helpers/utils' | ||
18 | import { changeVideoChannelShare } from '../../../lib/activitypub/share' | ||
19 | import { sendUpdateVideo } from '../../../lib/activitypub/send' | ||
20 | import { VideoModel } from '../../../models/video/video' | ||
21 | import { MVideoFullLight } from '@server/types/models' | ||
22 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
23 | 23 | ||
24 | const ownershipVideoRouter = express.Router() | 24 | const ownershipVideoRouter = express.Router() |
25 | 25 | ||
diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts index 84f42633e..96f6cd886 100644 --- a/server/controllers/api/videos/rate.ts +++ b/server/controllers/api/videos/rate.ts | |||
@@ -1,13 +1,13 @@ | |||
1 | import * as express from 'express' | 1 | import * as 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 { logger } from '../../../helpers/logger' | 4 | import { logger } from '../../../helpers/logger' |
4 | import { VIDEO_RATE_TYPES } from '../../../initializers/constants' | 5 | import { VIDEO_RATE_TYPES } from '../../../initializers/constants' |
6 | import { sequelizeTypescript } from '../../../initializers/database' | ||
5 | import { getLocalRateUrl, sendVideoRateChange } from '../../../lib/activitypub/video-rates' | 7 | import { getLocalRateUrl, sendVideoRateChange } from '../../../lib/activitypub/video-rates' |
6 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoUpdateRateValidator } from '../../../middlewares' | 8 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoUpdateRateValidator } from '../../../middlewares' |
7 | import { AccountModel } from '../../../models/account/account' | 9 | import { AccountModel } from '../../../models/account/account' |
8 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' | 10 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' |
9 | import { sequelizeTypescript } from '../../../initializers/database' | ||
10 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
11 | 11 | ||
12 | const rateVideoRouter = express.Router() | 12 | const rateVideoRouter = express.Router() |
13 | 13 | ||
diff --git a/server/controllers/api/videos/update.ts b/server/controllers/api/videos/update.ts index 8affe71c6..49639060b 100644 --- a/server/controllers/api/videos/update.ts +++ b/server/controllers/api/videos/update.ts | |||
@@ -2,10 +2,11 @@ import * as 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' |
5 | import { openapiOperationDoc } from '@server/middlewares/doc' | ||
5 | import { FilteredModelAttributes } from '@server/types' | 6 | import { FilteredModelAttributes } from '@server/types' |
6 | import { MVideoFullLight } from '@server/types/models' | 7 | import { MVideoFullLight } from '@server/types/models' |
7 | import { VideoUpdate } from '../../../../shared' | 8 | import { VideoUpdate } from '../../../../shared' |
8 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs' | 9 | import { HttpStatusCode } from '../../../../shared/models' |
9 | import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger' | 10 | import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger' |
10 | import { resetSequelizeInstance } from '../../../helpers/database-utils' | 11 | import { resetSequelizeInstance } from '../../../helpers/database-utils' |
11 | import { createReqFiles } from '../../../helpers/express-utils' | 12 | import { createReqFiles } from '../../../helpers/express-utils' |
@@ -20,7 +21,6 @@ import { autoBlacklistVideoIfNeeded } from '../../../lib/video-blacklist' | |||
20 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videosUpdateValidator } from '../../../middlewares' | 21 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videosUpdateValidator } from '../../../middlewares' |
21 | import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' | 22 | import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' |
22 | import { VideoModel } from '../../../models/video/video' | 23 | import { VideoModel } from '../../../models/video/video' |
23 | import { openapiOperationDoc } from '@server/middlewares/doc' | ||
24 | 24 | ||
25 | const lTags = loggerTagsFactory('api', 'video') | 25 | const lTags = loggerTagsFactory('api', 'video') |
26 | const auditLogger = auditLoggerFactory('videos') | 26 | const auditLogger = auditLoggerFactory('videos') |
diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts index bcd21ac99..408f677ff 100644 --- a/server/controllers/api/videos/upload.ts +++ b/server/controllers/api/videos/upload.ts | |||
@@ -6,12 +6,12 @@ import { uuidToShort } from '@server/helpers/uuid' | |||
6 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | 6 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' |
7 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' | 7 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' |
8 | import { addOptimizeOrMergeAudioJob, buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' | 8 | import { addOptimizeOrMergeAudioJob, buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' |
9 | import { generateVideoFilename, getVideoFilePath } from '@server/lib/video-paths' | 9 | import { generateWebTorrentVideoFilename, getVideoFilePath } from '@server/lib/video-paths' |
10 | import { openapiOperationDoc } from '@server/middlewares/doc' | 10 | import { openapiOperationDoc } from '@server/middlewares/doc' |
11 | import { MVideo, MVideoFile, MVideoFullLight } from '@server/types/models' | 11 | import { MVideo, MVideoFile, MVideoFullLight } from '@server/types/models' |
12 | import { uploadx } from '@uploadx/core' | 12 | import { uploadx } from '@uploadx/core' |
13 | import { VideoCreate, VideoState } from '../../../../shared' | 13 | import { VideoCreate, VideoState } from '../../../../shared' |
14 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs' | 14 | import { HttpStatusCode } from '../../../../shared/models' |
15 | import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger' | 15 | import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger' |
16 | import { retryTransactionWrapper } from '../../../helpers/database-utils' | 16 | import { retryTransactionWrapper } from '../../../helpers/database-utils' |
17 | import { createReqFiles } from '../../../helpers/express-utils' | 17 | import { createReqFiles } from '../../../helpers/express-utils' |
@@ -209,10 +209,12 @@ async function addVideo (options: { | |||
209 | }) | 209 | }) |
210 | 210 | ||
211 | createTorrentFederate(video, videoFile) | 211 | createTorrentFederate(video, videoFile) |
212 | .then(() => { | ||
213 | if (video.state !== VideoState.TO_TRANSCODE) return | ||
212 | 214 | ||
213 | if (video.state === VideoState.TO_TRANSCODE) { | 215 | return addOptimizeOrMergeAudioJob(videoCreated, videoFile, user) |
214 | await addOptimizeOrMergeAudioJob(videoCreated, videoFile, user) | 216 | }) |
215 | } | 217 | .catch(err => logger.error('Cannot add optimize/merge audio job for %s.', videoCreated.uuid, { err, ...lTags(videoCreated.uuid) })) |
216 | 218 | ||
217 | Hooks.runAction('action:api.video.uploaded', { video: videoCreated }) | 219 | Hooks.runAction('action:api.video.uploaded', { video: videoCreated }) |
218 | 220 | ||
@@ -240,7 +242,7 @@ async function buildNewFile (video: MVideo, videoPhysicalFile: express.VideoUplo | |||
240 | videoFile.resolution = (await getVideoFileResolution(videoPhysicalFile.path)).videoFileResolution | 242 | videoFile.resolution = (await getVideoFileResolution(videoPhysicalFile.path)).videoFileResolution |
241 | } | 243 | } |
242 | 244 | ||
243 | videoFile.filename = generateVideoFilename(video, false, videoFile.resolution, videoFile.extname) | 245 | videoFile.filename = generateWebTorrentVideoFilename(videoFile.resolution, videoFile.extname) |
244 | 246 | ||
245 | return videoFile | 247 | return videoFile |
246 | } | 248 | } |
@@ -259,9 +261,9 @@ async function createTorrentAndSetInfoHashAsync (video: MVideo, fileArg: MVideoF | |||
259 | return refreshedFile.save() | 261 | return refreshedFile.save() |
260 | } | 262 | } |
261 | 263 | ||
262 | function createTorrentFederate (video: MVideoFullLight, videoFile: MVideoFile): void { | 264 | function createTorrentFederate (video: MVideoFullLight, videoFile: MVideoFile) { |
263 | // Create the torrent file in async way because it could be long | 265 | // Create the torrent file in async way because it could be long |
264 | createTorrentAndSetInfoHashAsync(video, videoFile) | 266 | return createTorrentAndSetInfoHashAsync(video, videoFile) |
265 | .catch(err => logger.error('Cannot create torrent file for video %s', video.url, { err, ...lTags(video.uuid) })) | 267 | .catch(err => logger.error('Cannot create torrent file for video %s', video.url, { err, ...lTags(video.uuid) })) |
266 | .then(() => VideoModel.loadAndPopulateAccountAndServerAndTags(video.id)) | 268 | .then(() => VideoModel.loadAndPopulateAccountAndServerAndTags(video.id)) |
267 | .then(refreshedVideo => { | 269 | .then(refreshedVideo => { |
diff --git a/server/controllers/api/videos/watching.ts b/server/controllers/api/videos/watching.ts index 8b15525aa..05c75e543 100644 --- a/server/controllers/api/videos/watching.ts +++ b/server/controllers/api/videos/watching.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as 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 { | 4 | import { |
4 | asyncMiddleware, | 5 | asyncMiddleware, |
5 | asyncRetryTransactionMiddleware, | 6 | asyncRetryTransactionMiddleware, |
@@ -8,7 +9,6 @@ import { | |||
8 | videoWatchingValidator | 9 | videoWatchingValidator |
9 | } from '../../../middlewares' | 10 | } from '../../../middlewares' |
10 | import { UserVideoHistoryModel } from '../../../models/user/user-video-history' | 11 | import { UserVideoHistoryModel } from '../../../models/user/user-video-history' |
11 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
12 | 12 | ||
13 | const watchingRouter = express.Router() | 13 | const watchingRouter = express.Router() |
14 | 14 | ||