mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-19 11:11:05 +10:00
server: refactor pagination
* fix transaction usgae in repos * other bug fixes
This commit is contained in:
@ -14,9 +14,9 @@ export class CreatePageDto {
|
||||
icon?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@IsUUID()
|
||||
parentPageId?: string;
|
||||
|
||||
@IsString()
|
||||
@IsUUID()
|
||||
spaceId: string;
|
||||
}
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class DeletePageDto {
|
||||
@IsUUID()
|
||||
pageId: string;
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class HistoryDetailsDto {
|
||||
@IsUUID()
|
||||
historyId: string;
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class PageDetailsDto {
|
||||
@IsUUID()
|
||||
pageId: string;
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class PageHistoryDto {
|
||||
@IsUUID()
|
||||
pageId: string;
|
||||
}
|
||||
16
apps/server/src/core/page/dto/page.dto.ts
Normal file
16
apps/server/src/core/page/dto/page.dto.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class PageIdDto {
|
||||
@IsUUID()
|
||||
pageId: string;
|
||||
}
|
||||
|
||||
export class SpaceIdDto {
|
||||
@IsUUID()
|
||||
spaceId: string;
|
||||
}
|
||||
|
||||
export class PageHistoryIdDto {
|
||||
@IsUUID()
|
||||
historyId: string;
|
||||
}
|
||||
Reference in New Issue
Block a user