import { remove, writeJSON } from 'fs-extra'
import { getServerCommit } from '../../helpers/utils'
import { Emailer } from '../../lib/emailer'
-import { isNumeric } from 'validator'
+import validator from 'validator'
import { objectConverter } from '../../helpers/core-utils'
import { CONFIG, reloadConfig } from '../../initializers/config'
import { PluginManager } from '../../lib/plugins/plugin-manager'
async function getConfig (req: express.Request, res: express.Response) {
const { allowed } = await Hooks.wrapPromiseFun(
isSignupAllowed,
- {},
+ {
+ ip: req.ip
+ },
'filter:api.user.signup.allowed.result'
)
},
tracker: {
enabled: CONFIG.TRACKER.ENABLED
+ },
+
+ followings: {
+ instance: {
+ autoFollowIndex: {
+ indexUrl: CONFIG.FOLLOWINGS.INSTANCE.AUTO_FOLLOW_INDEX.INDEX_URL
+ }
+ }
}
}
}
function valueConverter (v: any) {
- if (isNumeric(v + '')) return parseInt('' + v, 10)
+ if (validator.isNumeric(v + '')) return parseInt('' + v, 10)
return v
}