add service
This commit is contained in:
@@ -43,7 +43,7 @@ export class CreateCategoryDto {
|
||||
})
|
||||
@ValidateIf((value) => value.parent !== null && value.parent)
|
||||
@IsOptional({ always: true })
|
||||
@Transform((value) => (value === 'null' ? null : value))
|
||||
@Transform(({ value }) => (value === 'null' ? null : value))
|
||||
parent?: string;
|
||||
|
||||
@Transform(({ value }) => toNumber(value))
|
||||
|
||||
@@ -11,6 +11,8 @@ import {
|
||||
} from 'class-validator';
|
||||
import { toNumber } from 'lodash';
|
||||
|
||||
import { PaginateOptions } from '@/modules/database/types';
|
||||
|
||||
export class QueryTagDto implements PaginateOptions {
|
||||
@Transform(({ value }) => toNumber(value))
|
||||
@Min(1, { message: 'The current page must be greater than 1.' })
|
||||
|
||||
Reference in New Issue
Block a user