mirror of
https://github.com/docmost/docmost.git
synced 2026-07-26 07:44:50 +10:00
fix: validate dto object
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
|||||||
IsNumber,
|
IsNumber,
|
||||||
IsOptional,
|
IsOptional,
|
||||||
IsString,
|
IsString,
|
||||||
|
IsUUID,
|
||||||
} from 'class-validator';
|
} from 'class-validator';
|
||||||
|
|
||||||
export class SearchDTO {
|
export class SearchDTO {
|
||||||
@@ -12,7 +13,7 @@ export class SearchDTO {
|
|||||||
query: string;
|
query: string;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsUUID()
|
||||||
spaceId: string;
|
spaceId: string;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@@ -20,7 +21,7 @@ export class SearchDTO {
|
|||||||
shareId?: string;
|
shareId?: string;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsUUID()
|
||||||
creatorId?: string;
|
creatorId?: string;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@@ -38,7 +39,7 @@ export class SearchShareDTO extends SearchDTO {
|
|||||||
shareId: string;
|
shareId: string;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsUUID()
|
||||||
spaceId: string;
|
spaceId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user