]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/middlewares/accounts.ts
Implement abuses check params
[github/Chocobozzz/PeerTube.git] / server / helpers / middlewares / accounts.ts
index bddea7eaa3f12326be09ba401da79fbdc45b2330..29b4ed1a6f56c737210f85817f5c6b97575df069 100644 (file)
@@ -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)
 }