mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Refactor user build and express file middlewares
This commit is contained in:
parent
90370f7cc8
commit
d3d3deaa7a
14 changed files with 91 additions and 106 deletions
|
@ -12,7 +12,6 @@ import { resetSequelizeInstance } from '../../helpers/database-utils'
|
|||
import { buildNSFWFilter, createReqFiles, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils'
|
||||
import { logger } from '../../helpers/logger'
|
||||
import { getFormattedObjects } from '../../helpers/utils'
|
||||
import { CONFIG } from '../../initializers/config'
|
||||
import { MIMETYPES } from '../../initializers/constants'
|
||||
import { sequelizeTypescript } from '../../initializers/database'
|
||||
import { sendUpdateActor } from '../../lib/activitypub/send'
|
||||
|
@ -51,8 +50,8 @@ import { VideoChannelModel } from '../../models/video/video-channel'
|
|||
import { VideoPlaylistModel } from '../../models/video/video-playlist'
|
||||
|
||||
const auditLogger = auditLoggerFactory('channels')
|
||||
const reqAvatarFile = createReqFiles([ 'avatarfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.TMP_DIR })
|
||||
const reqBannerFile = createReqFiles([ 'bannerfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { bannerfile: CONFIG.STORAGE.TMP_DIR })
|
||||
const reqAvatarFile = createReqFiles([ 'avatarfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT)
|
||||
const reqBannerFile = createReqFiles([ 'bannerfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT)
|
||||
|
||||
const videoChannelRouter = express.Router()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue