diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-05-22 20:58:25 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-05-25 17:32:16 +0200 |
commit | e02643f32e4c97ca307f8fc5b69be79c40d70a3b (patch) | |
tree | b7f6269913cd5a0e4f26a9461a043deb0c168be0 /server/controllers/api/users.ts | |
parent | 65fcc3119c334b75dd13bcfdebf186afdc580a8f (diff) | |
download | PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.gz PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.zst PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.zip |
Type models
Diffstat (limited to 'server/controllers/api/users.ts')
-rw-r--r-- | server/controllers/api/users.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts index 981a4706a..97a744f54 100644 --- a/server/controllers/api/users.ts +++ b/server/controllers/api/users.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import express = require('express') | 1 | import express = require('express') |
2 | import { waterfall } from 'async' | 2 | import { waterfall } from 'async' |
3 | 3 | ||
4 | const db = require('../../initializers/database') | 4 | import { database as db } from '../../initializers/database' |
5 | import { CONFIG, USER_ROLES } from '../../initializers' | 5 | import { CONFIG, USER_ROLES } from '../../initializers' |
6 | import { logger, getFormatedObjects } from '../../helpers' | 6 | import { logger, getFormatedObjects } from '../../helpers' |
7 | import { | 7 | import { |
@@ -114,7 +114,7 @@ function getUserVideoRating (req, res, next) { | |||
114 | const videoId = req.params.videoId | 114 | const videoId = req.params.videoId |
115 | const userId = res.locals.oauth.token.User.id | 115 | const userId = res.locals.oauth.token.User.id |
116 | 116 | ||
117 | db.UserVideoRate.load(userId, videoId, function (err, ratingObj) { | 117 | db.UserVideoRate.load(userId, videoId, null, function (err, ratingObj) { |
118 | if (err) return next(err) | 118 | if (err) return next(err) |
119 | 119 | ||
120 | const rating = ratingObj ? ratingObj.type : 'none' | 120 | const rating = ratingObj ? ratingObj.type : 'none' |