This commit is contained in:
Mitch-Budibase 2023-10-05 17:43:25 +01:00
parent 678033cc8b
commit 5e16d04519
6 changed files with 201 additions and 200 deletions

View File

@ -15,6 +15,6 @@ export default class AccountInternalAPI {
this.auth = new AuthAPI(this.client) this.auth = new AuthAPI(this.client)
this.accounts = new AccountAPI(this.client) this.accounts = new AccountAPI(this.client)
this.licenses = new LicenseAPI(this.client) this.licenses = new LicenseAPI(this.client)
this.stripe = new StripeAPI((this.client)) this.stripe = new StripeAPI(this.client)
} }
} }

View File

@ -25,14 +25,15 @@ describe("license activation", () => {
hosting: Hosting.SELF, hosting: Hosting.SELF,
}) })
const [createAccountRes, account] = const [createAccountRes, account] =
await config.accountsApi.accounts.create(createAccountRequest, { autoVerify: true }) await config.accountsApi.accounts.create(createAccountRequest, {
autoVerify: true,
})
let licenseKey: string = " " let licenseKey: string = " "
await config.doInNewState(async () => { await config.doInNewState(async () => {
await config.loginAsAccount(createAccountRequest) await config.loginAsAccount(createAccountRequest)
// Retrieve license key // Retrieve license key
const [res, body] = const [res, body] = await config.accountsApi.licenses.getLicenseKey()
await config.accountsApi.licenses.getLicenseKey()
licenseKey = body.licenseKey licenseKey = body.licenseKey
}) })