diff --git a/platform/wab/src/wab/client/components/studio/studio-frame.tsx b/platform/wab/src/wab/client/components/studio/studio-frame.tsx index af153b371fb..a33b28b8a75 100644 --- a/platform/wab/src/wab/client/components/studio/studio-frame.tsx +++ b/platform/wab/src/wab/client/components/studio/studio-frame.tsx @@ -148,10 +148,14 @@ export function StudioFrame({ const fetchProject = async () => { try { setIsRefreshingProjectData(true); - const { projects, perms: permissions } = await appCtx.api.getProjects({ - query: "byIds", - projectIds: [projectId], - }); + const [{ projects, perms: permissions }, { trustedHosts }] = + await Promise.all([ + appCtx.api.getProjects({ + query: "byIds", + projectIds: [projectId], + }), + appCtx.api.getTrustedHostsList(), + ]); const proj = maybeOne(projects); if (!proj) { throw new ForbiddenError("Project not found"); @@ -167,7 +171,6 @@ export function StudioFrame({ } const hostUrl = getHostUrl(proj, maybeBranch, appCtx.appConfig); setBranch(maybeBranch); - const { trustedHosts } = await appCtx.api.getTrustedHostsList(); const urlsOrDomains = [ ...trustedHosts.map((i) => i.hostUrl), ...whitelistedHosts, diff --git a/platform/wab/src/wab/server/db/DbMgr.ts b/platform/wab/src/wab/server/db/DbMgr.ts index 1942d97f872..cb4f71dd845 100644 --- a/platform/wab/src/wab/server/db/DbMgr.ts +++ b/platform/wab/src/wab/server/db/DbMgr.ts @@ -6390,9 +6390,20 @@ export class DbMgr implements MigrationDbMgr { // We don't check permissions here because we don't want to require permissions // to view the tutorial data sources. That could throw errors by sharing the project. return await this.dataSources().find({ - workspaceId, - source: "tutorialdb", - deletedAt: IsNull(), + // Don't select credentials to reduce processing time, involved in decrypting it + select: [ + "id", + "name", + "workspaceId", + "source", + "settings", + "createdById", + ], + where: { + workspaceId, + source: "tutorialdb", + deletedAt: IsNull(), + }, }); }