mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix lint
This commit is contained in:
@@ -226,7 +226,7 @@ async function listAccountVideos (req: express.Request, res: express.Response) {
|
||||
}, 'filter:api.accounts.videos.list.params')
|
||||
|
||||
const resultList = await Hooks.wrapPromiseFun(
|
||||
VideoModel.listForApi,
|
||||
VideoModel.listForApi.bind(VideoModel),
|
||||
apiOptions,
|
||||
'filter:api.accounts.videos.list.result'
|
||||
)
|
||||
|
||||
@@ -130,7 +130,7 @@ async function getVideos (
|
||||
}, 'filter:api.overviews.videos.list.params')
|
||||
|
||||
const { data } = await Hooks.wrapPromiseFun(
|
||||
VideoModel.listForApi,
|
||||
VideoModel.listForApi.bind(VideoModel),
|
||||
query,
|
||||
'filter:api.overviews.videos.list.result'
|
||||
)
|
||||
|
||||
@@ -102,7 +102,7 @@ async function searchVideoChannelsDB (query: VideoChannelsSearchQueryAfterSaniti
|
||||
}, 'filter:api.search.video-channels.local.list.params')
|
||||
|
||||
const resultList = await Hooks.wrapPromiseFun(
|
||||
VideoChannelModel.searchForApi,
|
||||
VideoChannelModel.searchForApi.bind(VideoChannelModel),
|
||||
apiOptions,
|
||||
'filter:api.search.video-channels.local.list.result'
|
||||
)
|
||||
|
||||
@@ -93,7 +93,7 @@ async function searchVideoPlaylistsDB (query: VideoPlaylistsSearchQueryAfterSani
|
||||
}, 'filter:api.search.video-playlists.local.list.params')
|
||||
|
||||
const resultList = await Hooks.wrapPromiseFun(
|
||||
VideoPlaylistModel.searchForApi,
|
||||
VideoPlaylistModel.searchForApi.bind(VideoPlaylistModel),
|
||||
apiOptions,
|
||||
'filter:api.search.video-playlists.local.list.result'
|
||||
)
|
||||
|
||||
@@ -121,7 +121,7 @@ async function searchVideosDB (query: VideosSearchQueryAfterSanitize, req: expre
|
||||
}, 'filter:api.search.videos.local.list.params')
|
||||
|
||||
const resultList = await Hooks.wrapPromiseFun(
|
||||
VideoModel.searchAndPopulateAccountAndServer,
|
||||
VideoModel.searchAndPopulateAccountAndServer.bind(VideoModel),
|
||||
apiOptions,
|
||||
'filter:api.search.videos.local.list.result'
|
||||
)
|
||||
|
||||
@@ -131,7 +131,7 @@ async function getUserVideos (req: express.Request, res: express.Response) {
|
||||
}, 'filter:api.user.me.videos.list.params')
|
||||
|
||||
const resultList = await Hooks.wrapPromiseFun(
|
||||
VideoModel.listUserVideosForApi,
|
||||
VideoModel.listUserVideosForApi.bind(VideoModel),
|
||||
apiOptions,
|
||||
'filter:api.user.me.videos.list.result'
|
||||
)
|
||||
|
||||
@@ -184,7 +184,7 @@ async function getUserSubscriptionVideos (req: express.Request, res: express.Res
|
||||
}, 'filter:api.user.me.subscription-videos.list.params')
|
||||
|
||||
const resultList = await Hooks.wrapPromiseFun(
|
||||
VideoModel.listForApi,
|
||||
VideoModel.listForApi.bind(VideoModel),
|
||||
apiOptions,
|
||||
'filter:api.user.me.subscription-videos.list.result'
|
||||
)
|
||||
|
||||
@@ -200,7 +200,7 @@ async function listVideoChannels (req: express.Request, res: express.Response) {
|
||||
}, 'filter:api.video-channels.list.params')
|
||||
|
||||
const resultList = await Hooks.wrapPromiseFun(
|
||||
VideoChannelModel.listForApi,
|
||||
VideoChannelModel.listForApi.bind(VideoChannelModel),
|
||||
apiOptions,
|
||||
'filter:api.video-channels.list.result'
|
||||
)
|
||||
@@ -409,7 +409,7 @@ async function listVideoChannelVideos (req: express.Request, res: express.Respon
|
||||
}, 'filter:api.video-channels.videos.list.params')
|
||||
|
||||
const resultList = await Hooks.wrapPromiseFun(
|
||||
VideoModel.listForApi,
|
||||
VideoModel.listForApi.bind(VideoModel),
|
||||
apiOptions,
|
||||
'filter:api.video-channels.videos.list.result'
|
||||
)
|
||||
|
||||
@@ -472,7 +472,7 @@ async function getVideoPlaylistVideos (req: express.Request, res: express.Respon
|
||||
}, 'filter:api.video-playlist.videos.list.params')
|
||||
|
||||
const resultList = await Hooks.wrapPromiseFun(
|
||||
VideoPlaylistElementModel.listForApi,
|
||||
VideoPlaylistElementModel.listForApi.bind(VideoPlaylistElementModel),
|
||||
apiOptions,
|
||||
'filter:api.video-playlist.videos.list.result'
|
||||
)
|
||||
|
||||
@@ -128,7 +128,7 @@ async function listVideoThreads (req: express.Request, res: express.Response) {
|
||||
}, 'filter:api.video-threads.list.params')
|
||||
|
||||
resultList = await Hooks.wrapPromiseFun(
|
||||
VideoCommentModel.listThreadsForApi,
|
||||
VideoCommentModel.listThreadsForApi.bind(VideoCommentModel),
|
||||
apiOptions,
|
||||
'filter:api.video-threads.list.result'
|
||||
)
|
||||
@@ -160,7 +160,7 @@ async function listVideoThreadComments (req: express.Request, res: express.Respo
|
||||
}, 'filter:api.video-thread-comments.list.params')
|
||||
|
||||
resultList = await Hooks.wrapPromiseFun(
|
||||
VideoCommentModel.listThreadCommentsForApi,
|
||||
VideoCommentModel.listThreadCommentsForApi.bind(VideoCommentModel),
|
||||
apiOptions,
|
||||
'filter:api.video-thread-comments.list.result'
|
||||
)
|
||||
|
||||
@@ -194,7 +194,7 @@ async function listVideos (req: express.Request, res: express.Response) {
|
||||
}, 'filter:api.videos.list.params')
|
||||
|
||||
const resultList = await Hooks.wrapPromiseFun(
|
||||
VideoModel.listForApi,
|
||||
VideoModel.listForApi.bind(VideoModel),
|
||||
apiOptions,
|
||||
'filter:api.videos.list.result'
|
||||
)
|
||||
|
||||
@@ -133,7 +133,7 @@ async function downloadVideoFile (req: express.Request, res: express.Response) {
|
||||
async function downloadHLSVideoFile (req: express.Request, res: express.Response) {
|
||||
const video = res.locals.videoAll
|
||||
const streamingPlaylist = getHLSPlaylist(video)
|
||||
if (!streamingPlaylist) return res.status(HttpStatusCode.NOT_FOUND_404).end
|
||||
if (!streamingPlaylist) return res.sendStatus(HttpStatusCode.NOT_FOUND_404)
|
||||
|
||||
const videoFile = getVideoFile(req, streamingPlaylist.VideoFiles)
|
||||
if (!videoFile) {
|
||||
|
||||
Reference in New Issue
Block a user