check for account portal URL

This commit is contained in:
Martin McKeaveney 2022-06-29 09:16:30 +01:00
parent 1a866b744a
commit e56ae519d8
1 changed files with 1 additions and 1 deletions

View File

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