mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Type models
This commit is contained in:
parent
65fcc3119c
commit
e02643f32e
76 changed files with 1710 additions and 816 deletions
|
@ -1,7 +1,7 @@
|
|||
import express = require('express')
|
||||
import { waterfall } from 'async'
|
||||
|
||||
const db = require('../../initializers/database')
|
||||
import { database as db } from '../../initializers/database'
|
||||
import { CONFIG, USER_ROLES } from '../../initializers'
|
||||
import { logger, getFormatedObjects } from '../../helpers'
|
||||
import {
|
||||
|
@ -114,7 +114,7 @@ function getUserVideoRating (req, res, next) {
|
|||
const videoId = req.params.videoId
|
||||
const userId = res.locals.oauth.token.User.id
|
||||
|
||||
db.UserVideoRate.load(userId, videoId, function (err, ratingObj) {
|
||||
db.UserVideoRate.load(userId, videoId, null, function (err, ratingObj) {
|
||||
if (err) return next(err)
|
||||
|
||||
const rating = ratingObj ? ratingObj.type : 'none'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue