diff options
Diffstat (limited to 'server/controllers/api/videos/rate.ts')
-rw-r--r-- | server/controllers/api/videos/rate.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts index 53952a0a2..914c596c3 100644 --- a/server/controllers/api/videos/rate.ts +++ b/server/controllers/api/videos/rate.ts | |||
@@ -6,7 +6,6 @@ import { getRateUrl, sendVideoRateChange } from '../../../lib/activitypub' | |||
6 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoUpdateRateValidator } from '../../../middlewares' | 6 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoUpdateRateValidator } from '../../../middlewares' |
7 | import { AccountModel } from '../../../models/account/account' | 7 | import { AccountModel } from '../../../models/account/account' |
8 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' | 8 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' |
9 | import { VideoModel } from '../../../models/video/video' | ||
10 | 9 | ||
11 | const rateVideoRouter = express.Router() | 10 | const rateVideoRouter = express.Router() |
12 | 11 | ||
@@ -27,8 +26,8 @@ export { | |||
27 | async function rateVideo (req: express.Request, res: express.Response) { | 26 | async function rateVideo (req: express.Request, res: express.Response) { |
28 | const body: UserVideoRateUpdate = req.body | 27 | const body: UserVideoRateUpdate = req.body |
29 | const rateType = body.rating | 28 | const rateType = body.rating |
30 | const videoInstance: VideoModel = res.locals.video | 29 | const videoInstance = res.locals.video |
31 | const userAccount: AccountModel = res.locals.oauth.token.User.Account | 30 | const userAccount = res.locals.oauth.token.User.Account |
32 | 31 | ||
33 | await sequelizeTypescript.transaction(async t => { | 32 | await sequelizeTypescript.transaction(async t => { |
34 | const sequelizeOptions = { transaction: t } | 33 | const sequelizeOptions = { transaction: t } |