Adding the request ip for hook filter:api.user.signup.allowed.result (#2416)
authorJohn Livingston <38844060+JohnXLivingston@users.noreply.github.com>
Mon, 20 Jan 2020 13:58:44 +0000 (14:58 +0100)
committerChocobozzz <chocobozzz@cpy.re>
Mon, 20 Jan 2020 13:58:44 +0000 (14:58 +0100)
* Adding the request ip for hook filter:api.user.signup.allowed.result

* Fix typo

server/controllers/api/config.ts

index 06ee1ee857a739d032a29ca4ce377c4ac6f3e154..ae4e0024896292f6e8c33c1810e2abdb83ff4810 100644 (file)
@@ -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'
   )