Web: Common: SettingsStore: added a request to store initialization to get lists of spaces
This commit is contained in:
parent
32d1e97b58
commit
946dbc3da1
@ -149,6 +149,8 @@ class SettingsStore {
|
||||
bookTrainingEmail = null;
|
||||
legalTerms = null;
|
||||
baseDomain = "onlyoffice.io";
|
||||
portals = [];
|
||||
domain = null;
|
||||
documentationEmail = null;
|
||||
publicRoomKey = "";
|
||||
|
||||
@ -424,7 +426,11 @@ class SettingsStore {
|
||||
this.getBuildVersionInfo(),
|
||||
);
|
||||
|
||||
await Promise.all(requests);
|
||||
await Promise.all(requests).then(() => {
|
||||
if (this.standalone) {
|
||||
this.getSpaces();
|
||||
}
|
||||
});
|
||||
|
||||
this.setIsLoading(false);
|
||||
this.setIsLoaded(true);
|
||||
@ -534,6 +540,16 @@ class SettingsStore {
|
||||
this.setLogoUrl(Object.values(res));
|
||||
};
|
||||
|
||||
getSpaces = async () => {
|
||||
const res = await api.management.getDomainName();
|
||||
const { settings } = res;
|
||||
if (settings) {
|
||||
const res = await api.management.getAllPortals();
|
||||
this.domain = settings;
|
||||
this.portals = res.tenants;
|
||||
}
|
||||
};
|
||||
|
||||
restoreCompanyInfoSettings = async () => {
|
||||
return await api.settings.restoreCompanyInfoSettings();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user