disable prod app sync
This commit is contained in:
parent
82ecaec405
commit
b55635c7ab
|
@ -439,6 +439,15 @@ export const destroy = async (ctx: any) => {
|
|||
}
|
||||
|
||||
export const sync = async (ctx: any, next: any) => {
|
||||
if (env.DISABLE_AUTO_PROD_APP_SYNC) {
|
||||
ctx.status = 200
|
||||
ctx.body = {
|
||||
message:
|
||||
"App sync disabled. You can reenable with the DISABLE_AUTO_PROD_APP_SYNC environment variable.",
|
||||
}
|
||||
return next()
|
||||
}
|
||||
|
||||
const appId = ctx.params.appId
|
||||
if (!isDevAppID(appId)) {
|
||||
ctx.throw(400, "This action cannot be performed for production apps")
|
||||
|
|
|
@ -57,6 +57,7 @@ module.exports = {
|
|||
JEST_WORKER_ID: process.env.JEST_WORKER_ID,
|
||||
BUDIBASE_ENVIRONMENT: process.env.BUDIBASE_ENVIRONMENT,
|
||||
DISABLE_ACCOUNT_PORTAL: process.env.DISABLE_ACCOUNT_PORTAL,
|
||||
DISABLE_AUTO_PROD_APP_SYNC: process.env.DISABLE_AUTO_PROD_APP_SYNC,
|
||||
// minor
|
||||
SALT_ROUNDS: process.env.SALT_ROUNDS,
|
||||
LOGGER: process.env.LOGGER,
|
||||
|
|
Loading…
Reference in New Issue