Analytics enabled/disabled via specific ENV variable
This commit is contained in:
parent
a1db3bfecf
commit
e4ea9e608d
|
@ -14,6 +14,7 @@ rimraf.sync(homedir)
|
||||||
|
|
||||||
process.env.BUDIBASE_API_KEY = "6BE826CB-6B30-4AEC-8777-2E90464633DE"
|
process.env.BUDIBASE_API_KEY = "6BE826CB-6B30-4AEC-8777-2E90464633DE"
|
||||||
process.env.NODE_ENV = "cypress"
|
process.env.NODE_ENV = "cypress"
|
||||||
|
process.env.ENABLE_ANALYTICS = "false"
|
||||||
|
|
||||||
initialiseBudibase({ dir: homedir, clientId: "cypress-test" })
|
initialiseBudibase({ dir: homedir, clientId: "cypress-test" })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
|
@ -17,3 +17,4 @@ LOG_LEVEL=error
|
||||||
DEPLOYMENT_CREDENTIALS_URL="https://dt4mpwwap8.execute-api.eu-west-1.amazonaws.com/prod/"
|
DEPLOYMENT_CREDENTIALS_URL="https://dt4mpwwap8.execute-api.eu-west-1.amazonaws.com/prod/"
|
||||||
DEPLOYMENT_DB_URL="https://couchdb.budi.live:5984"
|
DEPLOYMENT_DB_URL="https://couchdb.budi.live:5984"
|
||||||
SENTRY_DSN=https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131
|
SENTRY_DSN=https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131
|
||||||
|
ENABLE_ANALYTICS="true"
|
|
@ -1,3 +1,3 @@
|
||||||
exports.isEnabled = async function(ctx) {
|
exports.isEnabled = async function(ctx) {
|
||||||
ctx.body = JSON.stringify(process.env.NODE_ENV === "production")
|
ctx.body = JSON.stringify(process.env.ENABLE_ANALYTICS === "true")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue