re-adding account portal check
This commit is contained in:
parent
b1aab604c7
commit
65cff2a012
|
@ -142,7 +142,13 @@ exports.getBudibaseVersion = async ctx => {
|
||||||
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.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…
Reference in New Issue