mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Add migration script for channels
This commit is contained in:
parent
bcd9f81eff
commit
faab3a8453
4 changed files with 121 additions and 11 deletions
|
@ -158,16 +158,14 @@ async function getUserVideoRating (req: express.Request, res: express.Response,
|
|||
const videoId = +req.params.videoId
|
||||
const userId = +res.locals.oauth.token.User.id
|
||||
|
||||
db.UserVideoRate.load(userId, videoId, null)
|
||||
.then(ratingObj => {
|
||||
const rating = ratingObj ? ratingObj.type : 'none'
|
||||
const json: FormattedUserVideoRate = {
|
||||
videoId,
|
||||
rating
|
||||
}
|
||||
res.json(json)
|
||||
})
|
||||
.catch(err => next(err))
|
||||
const ratingObj = await db.UserVideoRate.load(userId, videoId, null)
|
||||
const rating = ratingObj ? ratingObj.type : 'none'
|
||||
|
||||
const json: FormattedUserVideoRate = {
|
||||
videoId,
|
||||
rating
|
||||
}
|
||||
res.json(json)
|
||||
}
|
||||
|
||||
async function listUsers (req: express.Request, res: express.Response, next: express.NextFunction) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue