Browse Source

default beta access baseURL to production

pull/6499/head
Martin McKeaveney 4 years ago
parent
commit
0c677757eb
  1. 10
      packages/server/src/api/controllers/dev.js

10
packages/server/src/api/controllers/dev.js

@ -141,8 +141,14 @@ exports.getBudibaseVersion = async ctx => {
// TODO: remove as part of beta program // TODO: remove as part of beta program
exports.checkBetaAccess = async ctx => { exports.checkBetaAccess = async ctx => {
// go to the cloud platform if running self hosted // go to the cloud platform if running self hosted
if ((env.ACCOUNT_PORTAL_URL && env.SELF_HOSTED) || !env.MULTI_TENANCY) { if (env.SELF_HOSTED || !env.MULTI_TENANCY) {
const baseUrl = env.ACCOUNT_PORTAL_URL.replace("account.", "") let baseUrl = ""
if (env.ACCOUNT_PORTAL_URL) {
baseUrl = env.ACCOUNT_PORTAL_URL.replace("account.", "")
} else {
baseUrl = "https://budibase.app"
}
const response = await fetch( const response = await fetch(
`${baseUrl}/api/beta/access?email=${ctx.query.email}` `${baseUrl}/api/beta/access?email=${ctx.query.email}`
) )

Loading…
Cancel
Save