diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/config.ts | 8 |
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' | |||
17 | import { CONFIG, reloadConfig } from '../../initializers/config' | 17 | import { CONFIG, reloadConfig } from '../../initializers/config' |
18 | import { PluginManager } from '../../lib/plugins/plugin-manager' | 18 | import { PluginManager } from '../../lib/plugins/plugin-manager' |
19 | import { getThemeOrDefault } from '../../lib/plugins/theme-utils' | 19 | import { getThemeOrDefault } from '../../lib/plugins/theme-utils' |
20 | import { Hooks } from '@server/lib/plugins/hooks' | ||
20 | 21 | ||
21 | const configRouter = express.Router() | 22 | const configRouter = express.Router() |
22 | 23 | ||
@@ -47,7 +48,12 @@ configRouter.delete('/custom', | |||
47 | let serverCommit: string | 48 | let serverCommit: string |
48 | 49 | ||
49 | async function getConfig (req: express.Request, res: express.Response) { | 50 | async 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 | ||