aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/middlewares/accounts.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-25 11:04:18 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-25 11:07:56 +0100
commit18490b07650d77d7fe376970b749af5a8c672fd6 (patch)
tree89741e63e34c2659487c9afa8309755064cb0c39 /server/helpers/middlewares/accounts.ts
parent5beb89f223539f1e415a976ff104f772526b4d20 (diff)
downloadPeerTube-18490b07650d77d7fe376970b749af5a8c672fd6.tar.gz
PeerTube-18490b07650d77d7fe376970b749af5a8c672fd6.tar.zst
PeerTube-18490b07650d77d7fe376970b749af5a8c672fd6.zip
Fix migration and test
Diffstat (limited to 'server/helpers/middlewares/accounts.ts')
-rw-r--r--server/helpers/middlewares/accounts.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/middlewares/accounts.ts b/server/helpers/middlewares/accounts.ts
index fa4a51e6c..e9b981262 100644
--- a/server/helpers/middlewares/accounts.ts
+++ b/server/helpers/middlewares/accounts.ts
@@ -39,11 +39,11 @@ async function doesAccountExist (p: Bluebird<MAccountDefault>, res: Response, se
39 return true 39 return true
40} 40}
41 41
42async function doesUserFeedTokenCorrespond (id: number | string, token: string, res: Response) { 42async function doesUserFeedTokenCorrespond (id: number, token: string, res: Response) {
43 const user = await UserModel.loadByIdWithChannels(parseInt(id + '', 10)) 43 const user = await UserModel.loadByIdWithChannels(parseInt(id + '', 10))
44 44
45 if (token !== user.feedToken) { 45 if (token !== user.feedToken) {
46 res.status(401) 46 res.status(403)
47 .json({ error: 'User and token mismatch' }) 47 .json({ error: 'User and token mismatch' })
48 48
49 return false 49 return false