X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fmiddlewares%2Faccounts.ts;h=29b4ed1a6f56c737210f85817f5c6b97575df069;hb=57f6896f67cfc570cf3605dd94b0778101b2d9b9;hp=bddea7eaa3f12326be09ba401da79fbdc45b2330;hpb=d95d15598847c7f020aa056e7e6e0c02d2bbf732;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/middlewares/accounts.ts b/server/helpers/middlewares/accounts.ts index bddea7eaa..29b4ed1a6 100644 --- a/server/helpers/middlewares/accounts.ts +++ b/server/helpers/middlewares/accounts.ts @@ -3,8 +3,8 @@ import { AccountModel } from '../../models/account/account' import * as Bluebird from 'bluebird' import { MAccountDefault } from '../../types/models' -function doesAccountIdExist (id: number, res: Response, sendNotFound = true) { - const promise = AccountModel.load(id) +function doesAccountIdExist (id: number | string, res: Response, sendNotFound = true) { + const promise = AccountModel.load(parseInt(id + '', 10)) return doesAccountExist(promise, res, sendNotFound) }