1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Add ability to mute a user/instance by server in server api

This commit is contained in:
Chocobozzz 2018-10-15 13:03:04 +02:00
parent af5767ffae
commit b44164bb56
12 changed files with 1035 additions and 309 deletions

View 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)
)