@mondart/nestjs-common-module 2.9.0 → 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,6 @@ const axios_1 = require("axios");
12
12
  const https_1 = require("https");
13
13
  const recaptcha_validator_resolver_1 = require("./services/recaptcha-validator.resolver");
14
14
  const enterprise_reason_transformer_1 = require("./services/enterprise-reason.transformer");
15
- const xor_1 = require("./helpers/xor");
16
15
  const recaptcha_config_ref_1 = require("./models/recaptcha-config-ref");
17
16
  class GoogleRecaptchaModule {
18
17
  static forRoot(options) {
@@ -144,7 +143,7 @@ class GoogleRecaptchaModule {
144
143
  }
145
144
  static validateOptions(options) {
146
145
  const hasEnterpriseOptions = !!Object.keys(options.enterprise || {}).length;
147
- if (!(0, xor_1.xor)(options.disable, !(0, xor_1.xor)(options.secretKey, hasEnterpriseOptions))) {
146
+ if (!options.disable && !(!!options.secretKey || hasEnterpriseOptions)) {
148
147
  throw new Error('Google recaptcha options must be contains "secretKey" xor "enterprise".');
149
148
  }
150
149
  }