@@ -99,6 +99,20 @@ protected void doTaskPerApp(AppIdentifier app) throws Exception {
9999 json .addProperty ("appId" , app .getAppId ());
100100 json .addProperty ("connectionUriDomain" , app .getConnectionUriDomain ());
101101
102+ { // website and API domains
103+ String websiteDomain = Multitenancy .getWebsiteDomain (
104+ StorageLayer .getStorage (app .getAsPublicTenantIdentifier (), main ), app );
105+ String apiDomain = Multitenancy .getAPIDomain (
106+ StorageLayer .getStorage (app .getAsPublicTenantIdentifier (), main ), app );
107+
108+ if (websiteDomain != null ) {
109+ json .addProperty ("websiteDomain" , websiteDomain );
110+ }
111+ if (apiDomain != null ) {
112+ json .addProperty ("apiDomain" , apiDomain );
113+ }
114+ }
115+
102116 if (StorageLayer .getBaseStorage (main ).getType () == STORAGE_TYPE .SQL ) {
103117 { // Users count across all tenants
104118 Storage [] storages = StorageLayer .getStoragesForApp (main , app );
@@ -137,19 +151,6 @@ protected void doTaskPerApp(AppIdentifier app) throws Exception {
137151 json .add ("maus" , mauArr );
138152 }
139153
140- { // website and API domains
141- String websiteDomain = Multitenancy .getWebsiteDomain (
142- StorageLayer .getStorage (app .getAsPublicTenantIdentifier (), main ), app );
143- String apiDomain = Multitenancy .getAPIDomain (
144- StorageLayer .getStorage (app .getAsPublicTenantIdentifier (), main ), app );
145-
146- if (websiteDomain != null ) {
147- json .addProperty ("websiteDomain" , websiteDomain );
148- }
149- if (apiDomain != null ) {
150- json .addProperty ("apiDomain" , apiDomain );
151- }
152- }
153154 } else {
154155 json .addProperty ("usersCount" , -1 );
155156 json .add ("dashboardUserEmails" , new JsonArray ());
0 commit comments