Skip to content

Commit

Permalink
Fixed incorrect type check on 'VOUCHER_CUSTOM', 'SERVICE_WEB' and 'AU…
Browse files Browse the repository at this point in the history
…TH_INTERNAL_ENABLED'
  • Loading branch information
glenndehaan committed Oct 4, 2024
1 parent b0a520d commit 83d228c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ module.exports = {
unifiSsid: config('unifi_ssid') || process.env.UNIFI_SSID || '',
unifiSsidPassword: config('unifi_ssid_password') || process.env.UNIFI_SSID_PASSWORD || '',
voucherTypes: config('voucher_types') || process.env.VOUCHER_TYPES || '480,1,,,;',
voucherCustom: config('voucher_custom') !== null ? config('voucher_custom') : process.env.VOUCHER_CUSTOM ? process.env.VOUCHER_CUSTOM !== 'false' : true,
serviceWeb: config('service_web') !== null ? config('service_web') : process.env.SERVICE_WEB ? process.env.SERVICE_WEB !== 'false' : true,
voucherCustom: typeof config('voucher_custom') !== 'undefined' ? config('voucher_custom') : typeof process.env.VOUCHER_CUSTOM !== 'undefined' ? process.env.VOUCHER_CUSTOM !== 'false' : true,
serviceWeb: typeof config('service_web') !== 'undefined' ? config('service_web') : typeof process.env.SERVICE_WEB !== 'undefined' ? process.env.SERVICE_WEB !== 'false' : true,
serviceApi: config('service_api') || (process.env.SERVICE_API === 'true') || false,
authInternalEnabled: config('auth_internal_enabled') !== null ? config('auth_internal_enabled') : process.env.AUTH_INTERNAL_ENABLED ? process.env.AUTH_INTERNAL_ENABLED !== 'false' : true,
authInternalEnabled: typeof config('auth_internal_enabled') !== 'undefined' ? config('auth_internal_enabled') : typeof process.env.AUTH_INTERNAL_ENABLED !== 'undefined' ? process.env.AUTH_INTERNAL_ENABLED !== 'false' : true,
authInternalPassword: config('auth_internal_password') || process.env.AUTH_INTERNAL_PASSWORD || '0000',
authToken: config('auth_internal_bearer_token') || process.env.AUTH_INTERNAL_BEARER_TOKEN || '00000000-0000-0000-0000-000000000000',
authOidcEnabled: config('auth_oidc_enabled') || (process.env.AUTH_OIDC_ENABLED === 'true') || false,
Expand Down

0 comments on commit 83d228c

Please sign in to comment.