1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Remove deprecated server code

This commit is contained in:
Chocobozzz 2024-11-04 10:16:31 +01:00
parent 11fd3a4618
commit 3842a527f6
No known key found for this signature in database
GPG key ID: 583A612D890159BE
39 changed files with 40 additions and 173 deletions

View file

@ -1,11 +1,11 @@
import express from 'express'
import validator from 'validator'
import { HttpStatusCode, UserRight } from '@peertube/peertube-models'
import { logger, loggerTagsFactory } from '@server/helpers/logger.js'
import { federateVideoIfNeeded } from '@server/lib/activitypub/videos/index.js'
import { updateM3U8AndShaPlaylist } from '@server/lib/hls.js'
import { removeAllWebVideoFiles, removeHLSFile, removeHLSPlaylist, removeWebVideoFile } from '@server/lib/video-file.js'
import { VideoFileModel } from '@server/models/video/video-file.js'
import { HttpStatusCode, UserRight } from '@peertube/peertube-models'
import express from 'express'
import validator from 'validator'
import {
asyncMiddleware,
authenticate,
@ -40,15 +40,13 @@ filesRouter.delete('/:id/hls/:videoFileId',
asyncMiddleware(removeHLSFileController)
)
filesRouter.delete(
[ '/:id/webtorrent', '/:id/web-videos' ], // TODO: remove webtorrent in V7
filesRouter.delete('/:id/web-videos',
authenticate,
ensureUserHasRight(UserRight.MANAGE_VIDEO_FILES),
asyncMiddleware(videoFilesDeleteWebVideoValidator),
asyncMiddleware(removeAllWebVideoFilesController)
)
filesRouter.delete(
[ '/:id/webtorrent/:videoFileId', '/:id/web-videos/:videoFileId' ], // TODO: remove webtorrent in V7
filesRouter.delete('/:id/web-videos/:videoFileId',
authenticate,
ensureUserHasRight(UserRight.MANAGE_VIDEO_FILES),
asyncMiddleware(videoFilesDeleteWebVideoFileValidator),