mirror of
https://github.com/docmost/docmost.git
synced 2026-07-25 23:54:43 +10: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');
|
throw new BadRequestException('Failed to upload file');
|
||||||
}
|
}
|
||||||
|
|
||||||
const baseId = file.fields?.baseId?.value;
|
const pageId = file.fields?.pageId?.value;
|
||||||
|
|
||||||
if (!baseId) {
|
if (!pageId) {
|
||||||
throw new BadRequestException('baseId is required');
|
throw new BadRequestException('pageId is required');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isValidUUID(baseId)) {
|
if (!isValidUUID(pageId)) {
|
||||||
throw new BadRequestException('Invalid baseId');
|
throw new BadRequestException('Invalid pageId');
|
||||||
}
|
}
|
||||||
|
|
||||||
const base = await this.baseRepo.findById(baseId);
|
const base = await this.baseRepo.findById(pageId);
|
||||||
|
|
||||||
if (!base) {
|
if (!base) {
|
||||||
throw new NotFoundException('Base not found');
|
throw new NotFoundException('Base not found');
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ export const TREE_EVENTS = new Set([
|
|||||||
'refetchRootTreeNodeEvent',
|
'refetchRootTreeNodeEvent',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export function getBaseRoomName(baseId: string): string {
|
export function getBaseRoomName(pageId: string): string {
|
||||||
return `base-${baseId}`;
|
return `base-${pageId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const BASE_INBOUND_EVENTS = new Set([
|
export const BASE_INBOUND_EVENTS = new Set([
|
||||||
|
|||||||
Reference in New Issue
Block a user