+ if (!await doesVideoExist(req.params.videoId, res, 'id')) return
+
+ const user = res.locals.oauth.token.User
+ if (user.videosHistoryEnabled === false) {
+ logger.warn('Cannot set videos to watch by user %d: videos history is disabled.', user.id)
+ return res.fail({
+ status: HttpStatusCode.CONFLICT_409,
+ message: 'Video history is disabled'
+ })
+ }