mirror of
https://github.com/docmost/docmost.git
synced 2026-06-10 01:52:43 +08:00
fix(base): rename remaining baseId references in attachment upload and ws utility
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user