]> 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 e955ffde9c2c9a198538a8e980e9006f1aa5ca6d..9575eab46261e05b09f745a899431a6503dad325 100644 (file)
@@ -6,14 +6,14 @@ import {
   asyncRetryTransactionMiddleware,
   authenticate,
   paginationValidator,
-  serverGetValidator,
   setDefaultPagination,
   setDefaultSort,
   unblockAccountByAccountValidator
 } from '../../../middlewares'
 import {
   accountsBlocklistSortValidator,
-  blockAccountByAccountValidator,
+  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(serverGetValidator),
+  asyncMiddleware(blockServerValidator),
   asyncRetryTransactionMiddleware(blockServer)
 )