diff --git a/apps/server/src/core/attachment/attachment.controller.ts b/apps/server/src/core/attachment/attachment.controller.ts index be9890145..e2f174145 100644 --- a/apps/server/src/core/attachment/attachment.controller.ts +++ b/apps/server/src/core/attachment/attachment.controller.ts @@ -195,17 +195,17 @@ export class AttachmentController { throw new BadRequestException('Failed to upload file'); } - const baseId = file.fields?.baseId?.value; + const pageId = file.fields?.pageId?.value; - if (!baseId) { - throw new BadRequestException('baseId is required'); + if (!pageId) { + throw new BadRequestException('pageId is required'); } - if (!isValidUUID(baseId)) { - throw new BadRequestException('Invalid baseId'); + if (!isValidUUID(pageId)) { + throw new BadRequestException('Invalid pageId'); } - const base = await this.baseRepo.findById(baseId); + const base = await this.baseRepo.findById(pageId); if (!base) { throw new NotFoundException('Base not found'); diff --git a/apps/server/src/ws/ws.utils.ts b/apps/server/src/ws/ws.utils.ts index 9db022ff7..366830289 100644 --- a/apps/server/src/ws/ws.utils.ts +++ b/apps/server/src/ws/ws.utils.ts @@ -17,8 +17,8 @@ export const TREE_EVENTS = new Set([ 'refetchRootTreeNodeEvent', ]); -export function getBaseRoomName(baseId: string): string { - return `base-${baseId}`; +export function getBaseRoomName(pageId: string): string { + return `base-${pageId}`; } export const BASE_INBOUND_EVENTS = new Set([