aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/users/my-blocklist.ts4
-rw-r--r--server/controllers/api/videos/watching.ts1
2 files changed, 1 insertions, 4 deletions
diff --git a/server/controllers/api/users/my-blocklist.ts b/server/controllers/api/users/my-blocklist.ts
index 481e75139..713c16022 100644
--- a/server/controllers/api/users/my-blocklist.ts
+++ b/server/controllers/api/users/my-blocklist.ts
@@ -17,11 +17,9 @@ import {
17 serversBlocklistSortValidator, 17 serversBlocklistSortValidator,
18 unblockServerByAccountValidator 18 unblockServerByAccountValidator
19} from '../../../middlewares/validators' 19} from '../../../middlewares/validators'
20import { AccountModel } from '../../../models/account/account'
21import { AccountBlocklistModel } from '../../../models/account/account-blocklist' 20import { AccountBlocklistModel } from '../../../models/account/account-blocklist'
22import { addAccountInBlocklist, addServerInBlocklist, removeAccountFromBlocklist, removeServerFromBlocklist } from '../../../lib/blocklist' 21import { addAccountInBlocklist, addServerInBlocklist, removeAccountFromBlocklist, removeServerFromBlocklist } from '../../../lib/blocklist'
23import { ServerBlocklistModel } from '../../../models/server/server-blocklist' 22import { ServerBlocklistModel } from '../../../models/server/server-blocklist'
24import { ServerModel } from '../../../models/server/server'
25 23
26const myBlocklistRouter = express.Router() 24const myBlocklistRouter = express.Router()
27 25
@@ -83,7 +81,7 @@ async function listBlockedAccounts (req: express.Request, res: express.Response)
83 81
84async function blockAccount (req: express.Request, res: express.Response) { 82async function blockAccount (req: express.Request, res: express.Response) {
85 const user = res.locals.oauth.token.User 83 const user = res.locals.oauth.token.User
86 const accountToBlock = res.locals.account 84 const accountToBlock = res.locals.account
87 85
88 await addAccountInBlocklist(user.Account.id, accountToBlock.id) 86 await addAccountInBlocklist(user.Account.id, accountToBlock.id)
89 87
diff --git a/server/controllers/api/videos/watching.ts b/server/controllers/api/videos/watching.ts
index 6bc60e045..dcd1f070d 100644
--- a/server/controllers/api/videos/watching.ts
+++ b/server/controllers/api/videos/watching.ts
@@ -2,7 +2,6 @@ import * as express from 'express'
2import { UserWatchingVideo } from '../../../../shared' 2import { UserWatchingVideo } from '../../../../shared'
3import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares' 3import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares'
4import { UserVideoHistoryModel } from '../../../models/account/user-video-history' 4import { UserVideoHistoryModel } from '../../../models/account/user-video-history'
5import { UserModel } from '../../../models/account/user'
6 5
7const watchingRouter = express.Router() 6const watchingRouter = express.Router()
8 7