diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-04 10:57:36 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-03-04 10:57:36 +0100 |
commit | d3d3deaa7aae49d6d949aebcba015af75d292ccc (patch) | |
tree | 42e487810f5b7362c28f744371d160a4effc7566 /server/controllers/api/video-channel.ts | |
parent | 90370f7cc85ee4b45eb0d1bafed2d9d68610df9f (diff) | |
download | PeerTube-d3d3deaa7aae49d6d949aebcba015af75d292ccc.tar.gz PeerTube-d3d3deaa7aae49d6d949aebcba015af75d292ccc.tar.zst PeerTube-d3d3deaa7aae49d6d949aebcba015af75d292ccc.zip |
Refactor user build and express file middlewares
Diffstat (limited to 'server/controllers/api/video-channel.ts')
-rw-r--r-- | server/controllers/api/video-channel.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts index 2f869d9b3..2454b1ec9 100644 --- a/server/controllers/api/video-channel.ts +++ b/server/controllers/api/video-channel.ts | |||
@@ -12,7 +12,6 @@ import { resetSequelizeInstance } from '../../helpers/database-utils' | |||
12 | import { buildNSFWFilter, createReqFiles, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils' | 12 | import { buildNSFWFilter, createReqFiles, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils' |
13 | import { logger } from '../../helpers/logger' | 13 | import { logger } from '../../helpers/logger' |
14 | import { getFormattedObjects } from '../../helpers/utils' | 14 | import { getFormattedObjects } from '../../helpers/utils' |
15 | import { CONFIG } from '../../initializers/config' | ||
16 | import { MIMETYPES } from '../../initializers/constants' | 15 | import { MIMETYPES } from '../../initializers/constants' |
17 | import { sequelizeTypescript } from '../../initializers/database' | 16 | import { sequelizeTypescript } from '../../initializers/database' |
18 | import { sendUpdateActor } from '../../lib/activitypub/send' | 17 | import { sendUpdateActor } from '../../lib/activitypub/send' |
@@ -51,8 +50,8 @@ import { VideoChannelModel } from '../../models/video/video-channel' | |||
51 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | 50 | import { VideoPlaylistModel } from '../../models/video/video-playlist' |
52 | 51 | ||
53 | const auditLogger = auditLoggerFactory('channels') | 52 | const auditLogger = auditLoggerFactory('channels') |
54 | const reqAvatarFile = createReqFiles([ 'avatarfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.TMP_DIR }) | 53 | const reqAvatarFile = createReqFiles([ 'avatarfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT) |
55 | const reqBannerFile = createReqFiles([ 'bannerfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { bannerfile: CONFIG.STORAGE.TMP_DIR }) | 54 | const reqBannerFile = createReqFiles([ 'bannerfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT) |
56 | 55 | ||
57 | const videoChannelRouter = express.Router() | 56 | const videoChannelRouter = express.Router() |
58 | 57 | ||