aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/accounts.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-12 15:26:04 +0200
committerChocobozzz <me@florianbigard.com>2018-10-16 16:41:36 +0200
commit7ad9b9846c44d198a736183fb186c2039f5236b5 (patch)
tree9c8456882a261c0522efb507f20e323c2741a0f8 /server/controllers/api/accounts.ts
parentdffd5d127f49eb63d2b2b3133aec75ec1d7e4dcb (diff)
downloadPeerTube-7ad9b9846c44d198a736183fb186c2039f5236b5.tar.gz
PeerTube-7ad9b9846c44d198a736183fb186c2039f5236b5.tar.zst
PeerTube-7ad9b9846c44d198a736183fb186c2039f5236b5.zip
Add ability for users to block an account/instance on server side
Diffstat (limited to 'server/controllers/api/accounts.ts')
-rw-r--r--server/controllers/api/accounts.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts
index 8e3f60010..86ef2aed1 100644
--- a/server/controllers/api/accounts.ts
+++ b/server/controllers/api/accounts.ts
@@ -1,7 +1,8 @@
1import * as express from 'express' 1import * as express from 'express'
2import { getFormattedObjects } from '../../helpers/utils' 2import { getFormattedObjects } from '../../helpers/utils'
3import { 3import {
4 asyncMiddleware, commonVideosFiltersValidator, 4 asyncMiddleware,
5 commonVideosFiltersValidator,
5 listVideoAccountChannelsValidator, 6 listVideoAccountChannelsValidator,
6 optionalAuthenticate, 7 optionalAuthenticate,
7 paginationValidator, 8 paginationValidator,
@@ -90,7 +91,7 @@ async function listAccountVideos (req: express.Request, res: express.Response, n
90 nsfw: buildNSFWFilter(res, req.query.nsfw), 91 nsfw: buildNSFWFilter(res, req.query.nsfw),
91 withFiles: false, 92 withFiles: false,
92 accountId: account.id, 93 accountId: account.id,
93 userId: res.locals.oauth ? res.locals.oauth.token.User.id : undefined 94 user: res.locals.oauth ? res.locals.oauth.token.User : undefined
94 }) 95 })
95 96
96 return res.json(getFormattedObjects(resultList.data, resultList.total)) 97 return res.json(getFormattedObjects(resultList.data, resultList.total))