1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Improve blacklist management

This commit is contained in:
Chocobozzz 2018-08-14 09:08:47 +02:00
parent 26b7305a23
commit 191764f30b
No known key found for this signature in database
GPG key ID: 583A612D890159BE
23 changed files with 189 additions and 45 deletions

View file

@ -1,5 +1,5 @@
import * as express from 'express'
import { BlacklistedVideo, UserRight, VideoBlacklistCreate } from '../../../../shared'
import { VideoBlacklist, UserRight, VideoBlacklistCreate } from '../../../../shared'
import { logger } from '../../../helpers/logger'
import { getFormattedObjects } from '../../../helpers/utils'
import {
@ -87,7 +87,7 @@ async function updateVideoBlacklistController (req: express.Request, res: expres
async function listBlacklist (req: express.Request, res: express.Response, next: express.NextFunction) {
const resultList = await VideoBlacklistModel.listForApi(req.query.start, req.query.count, req.query.sort)
return res.json(getFormattedObjects<BlacklistedVideo, VideoBlacklistModel>(resultList.data, resultList.total))
return res.json(getFormattedObjects<VideoBlacklist, VideoBlacklistModel>(resultList.data, resultList.total))
}
async function removeVideoFromBlacklistController (req: express.Request, res: express.Response, next: express.NextFunction) {