summaryrefslogtreecommitdiff
path: root/src/models/meta.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/meta.ts')
-rw-r--r--src/models/meta.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/models/meta.ts b/src/models/meta.ts
index 073be7de82..3eb73681ac 100644
--- a/src/models/meta.ts
+++ b/src/models/meta.ts
@@ -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)
*/