From 2ba92871319d7af63472c1380664a9f9eeb1c690 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 19 Mar 2019 16:23:02 +0100 Subject: Cleanup invalid rates/comments/shares --- server/controllers/api/users/my-blocklist.ts | 4 +--- server/controllers/api/videos/watching.ts | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'server/controllers/api') 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 { serversBlocklistSortValidator, unblockServerByAccountValidator } from '../../../middlewares/validators' -import { AccountModel } from '../../../models/account/account' import { AccountBlocklistModel } from '../../../models/account/account-blocklist' import { addAccountInBlocklist, addServerInBlocklist, removeAccountFromBlocklist, removeServerFromBlocklist } from '../../../lib/blocklist' import { ServerBlocklistModel } from '../../../models/server/server-blocklist' -import { ServerModel } from '../../../models/server/server' const myBlocklistRouter = express.Router() @@ -83,7 +81,7 @@ async function listBlockedAccounts (req: express.Request, res: express.Response) async function blockAccount (req: express.Request, res: express.Response) { const user = res.locals.oauth.token.User - const accountToBlock = res.locals.account + const accountToBlock = res.locals.account await addAccountInBlocklist(user.Account.id, accountToBlock.id) 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' import { UserWatchingVideo } from '../../../../shared' import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares' import { UserVideoHistoryModel } from '../../../models/account/user-video-history' -import { UserModel } from '../../../models/account/user' const watchingRouter = express.Router() -- cgit v1.2.3