]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/blacklist.ts
Use video abuse filters on client side
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / blacklist.ts
index 2a667480d468397438ec5e48d4f074ecafe13471..abd09387cf45b44cde1d71101541ba14b65f6efd 100644 (file)
@@ -19,7 +19,7 @@ import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
 import { sequelizeTypescript } from '../../../initializers'
 import { Notifier } from '../../../lib/notifier'
 import { sendDeleteVideo } from '../../../lib/activitypub/send'
-import { federateVideoIfNeeded } from '../../../lib/activitypub'
+import { federateVideoIfNeeded } from '../../../lib/activitypub/videos'
 import { MVideoBlacklistVideo } from '@server/typings/models'
 
 const blacklistRouter = express.Router()
@@ -102,7 +102,13 @@ async function updateVideoBlacklistController (req: express.Request, res: expres
 }
 
 async function listBlacklist (req: express.Request, res: express.Response) {
-  const resultList = await VideoBlacklistModel.listForApi(req.query.start, req.query.count, req.query.sort, req.query.type)
+  const resultList = await VideoBlacklistModel.listForApi({
+    start: req.query.start,
+    count: req.query.count,
+    sort: req.query.sort,
+    search: req.query.search,
+    type: req.query.type
+  })
 
   return res.json(getFormattedObjects(resultList.data, resultList.total))
 }