reCAPTCHAの設定をDBに保存するように
This commit is contained in:
@ -61,6 +61,19 @@ if ((config as any).preventCacheRemoteFiles) {
|
||||
}
|
||||
});
|
||||
}
|
||||
if ((config as any).recaptcha) {
|
||||
Meta.findOne({}).then(m => {
|
||||
if (m != null && m.enableRecaptcha == null) {
|
||||
Meta.update({}, {
|
||||
$set: {
|
||||
enableRecaptcha: (config as any).recaptcha != null,
|
||||
recaptchaSiteKey: (config as any).recaptcha.site_key,
|
||||
recaptchaSecretKey: (config as any).recaptcha.secret_key,
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export type IMeta = {
|
||||
name?: string;
|
||||
@ -79,6 +92,10 @@ export type IMeta = {
|
||||
|
||||
cacheRemoteFiles?: boolean;
|
||||
|
||||
enableRecaptcha?: boolean;
|
||||
recaptchaSiteKey?: string;
|
||||
recaptchaSecretKey?: string;
|
||||
|
||||
/**
|
||||
* Drive capacity of a local user (MB)
|
||||
*/
|
||||
|
Reference in New Issue
Block a user