Skip to content

Commit

Permalink
Optimize the code
Browse files Browse the repository at this point in the history
Signed-off-by: yubonluo <yubonluo@amazon.com>
  • Loading branch information
yubonluo committed Apr 2, 2024
1 parent 166451a commit 363aeaa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/plugins/workspace/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,8 @@ export class WorkspacePlugin implements Plugin<{}, {}> {
const configClient = applicationConfig.getConfigurationClient(scopeClient);

const [adminGroups, adminUsers] = await Promise.all([
configClient.getEntityConfig('workspace.dashboardAdmin.groups').catch(() => {
return undefined;
}),
configClient.getEntityConfig('workspace.dashboardAdmin.users').catch(() => {
return undefined;
}),
configClient.getEntityConfig('workspace.dashboardAdmin.groups').catch(() => undefined),
configClient.getEntityConfig('workspace.dashboardAdmin.users').catch(() => undefined),
]);

const isDashboardAdmin = isRequestByDashboardAdmin(
Expand Down

0 comments on commit 363aeaa

Please sign in to comment.