diff --git a/components/server/src/prebuilds/prebuild-manager.ts b/components/server/src/prebuilds/prebuild-manager.ts index 77e68cc3968cf8..d26555f507311f 100644 --- a/components/server/src/prebuilds/prebuild-manager.ts +++ b/components/server/src/prebuilds/prebuild-manager.ts @@ -677,11 +677,10 @@ export class PrebuildManager { onLog: (chunk: Uint8Array) => Promise, ): Promise<{ taskUrl: string } | undefined> { const prebuild = await this.getPrebuild({}, userId, prebuildId); - const organizationId = prebuild?.info.teamId; - if (!prebuild || !organizationId) { + if (!prebuild) { throw new ApplicationError(ErrorCodes.PRECONDITION_FAILED, "prebuild workspace not found"); } - await this.auth.checkPermissionOnProject(userId, "read_prebuild", organizationId); + await this.auth.checkPermissionOnProject(userId, "read_prebuild", prebuild.info.projectId); const instance = await this.workspaceService.getCurrentInstance(userId, prebuild.workspace.id, { skipPermissionCheck: true, diff --git a/components/server/src/projects/projects-service.ts b/components/server/src/projects/projects-service.ts index 19e820cfc4b085..4722926098c5dd 100644 --- a/components/server/src/projects/projects-service.ts +++ b/components/server/src/projects/projects-service.ts @@ -447,8 +447,10 @@ export class ProjectsService { partialProject.settings.prebuilds.triggerStrategy = "activity-based"; } } + return this.projectDB.updateProject(partialProject); } + private async checkProjectSettings(userId: string, settings?: PartialProject["settings"]) { if (!settings) { return; diff --git a/components/server/src/workspace/headless-log-service.ts b/components/server/src/workspace/headless-log-service.ts index 197eb3d2d2b333..2d2966440a9c56 100644 --- a/components/server/src/workspace/headless-log-service.ts +++ b/components/server/src/workspace/headless-log-service.ts @@ -102,7 +102,7 @@ export class HeadlessLogService { } } - // we were unable to get a repsonse from supervisor - let's try content service next + // we were unable to get a response from supervisor - let's try content service next return await this.contentServiceListLogs(wsi, ownerId); }