1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Fix migration and test

This commit is contained in:
Chocobozzz 2020-11-25 11:04:18 +01:00 committed by Chocobozzz
parent 5beb89f223
commit 18490b0765
11 changed files with 162 additions and 80 deletions

View file

@ -39,11 +39,11 @@ async function doesAccountExist (p: Bluebird<MAccountDefault>, res: Response, se
return true
}
async function doesUserFeedTokenCorrespond (id: number | string, token: string, res: Response) {
async function doesUserFeedTokenCorrespond (id: number, token: string, res: Response) {
const user = await UserModel.loadByIdWithChannels(parseInt(id + '', 10))
if (token !== user.feedToken) {
res.status(401)
res.status(403)
.json({ error: 'User and token mismatch' })
return false