aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/update.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-04 10:57:36 +0100
committerChocobozzz <me@florianbigard.com>2022-03-04 10:57:36 +0100
commitd3d3deaa7aae49d6d949aebcba015af75d292ccc (patch)
tree42e487810f5b7362c28f744371d160a4effc7566 /server/controllers/api/videos/update.ts
parent90370f7cc85ee4b45eb0d1bafed2d9d68610df9f (diff)
downloadPeerTube-d3d3deaa7aae49d6d949aebcba015af75d292ccc.tar.gz
PeerTube-d3d3deaa7aae49d6d949aebcba015af75d292ccc.tar.zst
PeerTube-d3d3deaa7aae49d6d949aebcba015af75d292ccc.zip
Refactor user build and express file middlewares
Diffstat (limited to 'server/controllers/api/videos/update.ts')
-rw-r--r--server/controllers/api/videos/update.ts10
1 files changed, 1 insertions, 9 deletions
diff --git a/server/controllers/api/videos/update.ts b/server/controllers/api/videos/update.ts
index f600847d4..8906003fc 100644
--- a/server/controllers/api/videos/update.ts
+++ b/server/controllers/api/videos/update.ts
@@ -11,7 +11,6 @@ import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../
11import { resetSequelizeInstance } from '../../../helpers/database-utils' 11import { resetSequelizeInstance } from '../../../helpers/database-utils'
12import { createReqFiles } from '../../../helpers/express-utils' 12import { createReqFiles } from '../../../helpers/express-utils'
13import { logger, loggerTagsFactory } from '../../../helpers/logger' 13import { logger, loggerTagsFactory } from '../../../helpers/logger'
14import { CONFIG } from '../../../initializers/config'
15import { MIMETYPES } from '../../../initializers/constants' 14import { MIMETYPES } from '../../../initializers/constants'
16import { sequelizeTypescript } from '../../../initializers/database' 15import { sequelizeTypescript } from '../../../initializers/database'
17import { federateVideoIfNeeded } from '../../../lib/activitypub/videos' 16import { federateVideoIfNeeded } from '../../../lib/activitypub/videos'
@@ -26,14 +25,7 @@ const lTags = loggerTagsFactory('api', 'video')
26const auditLogger = auditLoggerFactory('videos') 25const auditLogger = auditLoggerFactory('videos')
27const updateRouter = express.Router() 26const updateRouter = express.Router()
28 27
29const reqVideoFileUpdate = createReqFiles( 28const reqVideoFileUpdate = createReqFiles([ 'thumbnailfile', 'previewfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT)
30 [ 'thumbnailfile', 'previewfile' ],
31 MIMETYPES.IMAGE.MIMETYPE_EXT,
32 {
33 thumbnailfile: CONFIG.STORAGE.TMP_DIR,
34 previewfile: CONFIG.STORAGE.TMP_DIR
35 }
36)
37 29
38updateRouter.put('/:id', 30updateRouter.put('/:id',
39 openapiOperationDoc({ operationId: 'putVideo' }), 31 openapiOperationDoc({ operationId: 'putVideo' }),