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:
parent
5beb89f223
commit
18490b0765
11 changed files with 162 additions and 80 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue