From: John Livingston <38844060+JohnXLivingston@users.noreply.github.com> Date: Mon, 20 Jan 2020 13:58:44 +0000 (+0100) Subject: Adding the request ip for hook filter:api.user.signup.allowed.result (#2416) X-Git-Tag: v2.1.0-rc.1~30 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=70870adfacbbcfbe223651b0c74811d21805ab0f;p=oweals%2Fpeertube.git Adding the request ip for hook filter:api.user.signup.allowed.result (#2416) * Adding the request ip for hook filter:api.user.signup.allowed.result * Fix typo --- diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index 06ee1ee85..ae4e00248 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts @@ -50,7 +50,9 @@ let serverCommit: string async function getConfig (req: express.Request, res: express.Response) { const { allowed } = await Hooks.wrapPromiseFun( isSignupAllowed, - {}, + { + ip: req.ip + }, 'filter:api.user.signup.allowed.result' )