From 18490b07650d77d7fe376970b749af5a8c672fd6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Nov 2020 11:04:18 +0100 Subject: Fix migration and test --- server/helpers/middlewares/accounts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/helpers') 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, 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 -- cgit v1.2.3