diff options
Diffstat (limited to 'server/controllers/api/users.ts')
-rw-r--r-- | server/controllers/api/users.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts index ffe5881e5..1e9e65689 100644 --- a/server/controllers/api/users.ts +++ b/server/controllers/api/users.ts | |||
@@ -17,6 +17,7 @@ import { | |||
17 | setUsersSort, | 17 | setUsersSort, |
18 | token | 18 | token |
19 | } from '../../middlewares' | 19 | } from '../../middlewares' |
20 | import { UserVideoRate as FormatedUserVideoRate } from '../../../shared' | ||
20 | 21 | ||
21 | const usersRouter = express.Router() | 22 | const usersRouter = express.Router() |
22 | 23 | ||
@@ -119,10 +120,11 @@ function getUserVideoRating (req: express.Request, res: express.Response, next: | |||
119 | 120 | ||
120 | const rating = ratingObj ? ratingObj.type : 'none' | 121 | const rating = ratingObj ? ratingObj.type : 'none' |
121 | 122 | ||
122 | res.json({ | 123 | const json: FormatedUserVideoRate = { |
123 | videoId, | 124 | videoId, |
124 | rating | 125 | rating |
125 | }) | 126 | } |
127 | res.json(json) | ||
126 | }) | 128 | }) |
127 | } | 129 | } |
128 | 130 | ||