aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users')
-rw-r--r--server/controllers/api/users/my-blocklist.ts16
1 files changed, 14 insertions, 2 deletions
diff --git a/server/controllers/api/users/my-blocklist.ts b/server/controllers/api/users/my-blocklist.ts
index 713c16022..3a44376f2 100644
--- a/server/controllers/api/users/my-blocklist.ts
+++ b/server/controllers/api/users/my-blocklist.ts
@@ -74,7 +74,13 @@ export {
74async function listBlockedAccounts (req: express.Request, res: express.Response) { 74async function listBlockedAccounts (req: express.Request, res: express.Response) {
75 const user = res.locals.oauth.token.User 75 const user = res.locals.oauth.token.User
76 76
77 const resultList = await AccountBlocklistModel.listForApi(user.Account.id, req.query.start, req.query.count, req.query.sort) 77 const resultList = await AccountBlocklistModel.listForApi({
78 start: req.query.start,
79 count: req.query.count,
80 sort: req.query.sort,
81 search: req.query.search,
82 accountId: user.Account.id
83 })
78 84
79 return res.json(getFormattedObjects(resultList.data, resultList.total)) 85 return res.json(getFormattedObjects(resultList.data, resultList.total))
80} 86}
@@ -99,7 +105,13 @@ async function unblockAccount (req: express.Request, res: express.Response) {
99async function listBlockedServers (req: express.Request, res: express.Response) { 105async function listBlockedServers (req: express.Request, res: express.Response) {
100 const user = res.locals.oauth.token.User 106 const user = res.locals.oauth.token.User
101 107
102 const resultList = await ServerBlocklistModel.listForApi(user.Account.id, req.query.start, req.query.count, req.query.sort) 108 const resultList = await ServerBlocklistModel.listForApi({
109 start: req.query.start,
110 count: req.query.count,
111 sort: req.query.sort,
112 search: req.query.search,
113 accountId: user.Account.id
114 })
103 115
104 return res.json(getFormattedObjects(resultList.data, resultList.total)) 116 return res.json(getFormattedObjects(resultList.data, resultList.total))
105} 117}