]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/users/my-blocklist.ts
Better AP route checker
[github/Chocobozzz/PeerTube.git] / server / controllers / api / users / my-blocklist.ts
index 95a4105ec31d380ce60da830ba7756bbc83ce3aa..9575eab46261e05b09f745a899431a6503dad325 100644 (file)
@@ -12,8 +12,8 @@ import {
 } from '../../../middlewares'
 import {
   accountsBlocklistSortValidator,
-  blockAccountByAccountValidator,
-  blockServerByAccountValidator,
+  blockAccountValidator,
+  blockServerValidator,
   serversBlocklistSortValidator,
   unblockServerByAccountValidator
 } from '../../../middlewares/validators'
@@ -37,7 +37,7 @@ myBlocklistRouter.get('/me/blocklist/accounts',
 
 myBlocklistRouter.post('/me/blocklist/accounts',
   authenticate,
-  asyncMiddleware(blockAccountByAccountValidator),
+  asyncMiddleware(blockAccountValidator),
   asyncRetryTransactionMiddleware(blockAccount)
 )
 
@@ -58,7 +58,7 @@ myBlocklistRouter.get('/me/blocklist/servers',
 
 myBlocklistRouter.post('/me/blocklist/servers',
   authenticate,
-  asyncMiddleware(blockServerByAccountValidator),
+  asyncMiddleware(blockServerValidator),
   asyncRetryTransactionMiddleware(blockServer)
 )