aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/config.ts')
-rw-r--r--server/controllers/api/config.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 39a124fc5..113c1e9db 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -17,6 +17,7 @@ import { objectConverter } from '../../helpers/core-utils'
17import { CONFIG, reloadConfig } from '../../initializers/config' 17import { CONFIG, reloadConfig } from '../../initializers/config'
18import { PluginManager } from '../../lib/plugins/plugin-manager' 18import { PluginManager } from '../../lib/plugins/plugin-manager'
19import { getThemeOrDefault } from '../../lib/plugins/theme-utils' 19import { getThemeOrDefault } from '../../lib/plugins/theme-utils'
20import { Hooks } from '@server/lib/plugins/hooks'
20 21
21const configRouter = express.Router() 22const configRouter = express.Router()
22 23
@@ -47,7 +48,12 @@ configRouter.delete('/custom',
47let serverCommit: string 48let serverCommit: string
48 49
49async function getConfig (req: express.Request, res: express.Response) { 50async function getConfig (req: express.Request, res: express.Response) {
50 const allowed = await isSignupAllowed() 51 const { allowed } = await Hooks.wrapPromiseFun(
52 isSignupAllowed,
53 {},
54 'filter:api.user.signup.allowed.result'
55 )
56
51 const allowedForCurrentIP = isSignupAllowedForCurrentIP(req.ip) 57 const allowedForCurrentIP = isSignupAllowedForCurrentIP(req.ip)
52 const defaultTheme = getThemeOrDefault(CONFIG.THEME.DEFAULT, DEFAULT_THEME_NAME) 58 const defaultTheme = getThemeOrDefault(CONFIG.THEME.DEFAULT, DEFAULT_THEME_NAME)
53 59