diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-19 16:23:02 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-03-19 16:23:02 +0100 |
commit | 2ba92871319d7af63472c1380664a9f9eeb1c690 (patch) | |
tree | d593b2dfea29a8171b9f6afaaef076321f5edf71 /server/controllers | |
parent | d74d29ad9e35929491cf37223398d2535ab23de0 (diff) | |
download | PeerTube-2ba92871319d7af63472c1380664a9f9eeb1c690.tar.gz PeerTube-2ba92871319d7af63472c1380664a9f9eeb1c690.tar.zst PeerTube-2ba92871319d7af63472c1380664a9f9eeb1c690.zip |
Cleanup invalid rates/comments/shares
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/users/my-blocklist.ts | 4 | ||||
-rw-r--r-- | server/controllers/api/videos/watching.ts | 1 |
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' |
20 | import { AccountModel } from '../../../models/account/account' | ||
21 | import { AccountBlocklistModel } from '../../../models/account/account-blocklist' | 20 | import { AccountBlocklistModel } from '../../../models/account/account-blocklist' |
22 | import { addAccountInBlocklist, addServerInBlocklist, removeAccountFromBlocklist, removeServerFromBlocklist } from '../../../lib/blocklist' | 21 | import { addAccountInBlocklist, addServerInBlocklist, removeAccountFromBlocklist, removeServerFromBlocklist } from '../../../lib/blocklist' |
23 | import { ServerBlocklistModel } from '../../../models/server/server-blocklist' | 22 | import { ServerBlocklistModel } from '../../../models/server/server-blocklist' |
24 | import { ServerModel } from '../../../models/server/server' | ||
25 | 23 | ||
26 | const myBlocklistRouter = express.Router() | 24 | const myBlocklistRouter = express.Router() |
27 | 25 | ||
@@ -83,7 +81,7 @@ async function listBlockedAccounts (req: express.Request, res: express.Response) | |||
83 | 81 | ||
84 | async function blockAccount (req: express.Request, res: express.Response) { | 82 | async 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' | |||
2 | import { UserWatchingVideo } from '../../../../shared' | 2 | import { UserWatchingVideo } from '../../../../shared' |
3 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares' | 3 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares' |
4 | import { UserVideoHistoryModel } from '../../../models/account/user-video-history' | 4 | import { UserVideoHistoryModel } from '../../../models/account/user-video-history' |
5 | import { UserModel } from '../../../models/account/user' | ||
6 | 5 | ||
7 | const watchingRouter = express.Router() | 6 | const watchingRouter = express.Router() |
8 | 7 | ||