server request depends on the OpenAPI.Base is set. Make sure it happens before connecting to the server
This commit is contained in:
@@ -74,7 +74,6 @@ export class UmbAppElement extends UmbLitElement {
|
||||
|
||||
async #setup() {
|
||||
if (this.serverUrl === undefined) throw new Error('No serverUrl provided');
|
||||
OpenAPI.BASE = this.serverUrl;
|
||||
const redirectUrl = `${window.location.origin}${this.backofficePath}`;
|
||||
|
||||
this.#serverConnection = new UmbServerConnection(this.serverUrl);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RuntimeLevelModel, ServerResource } from '@umbraco-cms/backoffice/backend-api';
|
||||
import { OpenAPI, RuntimeLevelModel, ServerResource } from '@umbraco-cms/backoffice/backend-api';
|
||||
import { UmbBooleanState } from '@umbraco-cms/backoffice/observable-api';
|
||||
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
||||
|
||||
@@ -11,6 +11,7 @@ export class UmbServerConnection {
|
||||
|
||||
constructor(serverUrl: string) {
|
||||
this.#url = serverUrl;
|
||||
OpenAPI.BASE = this.#url;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user