mirror of
https://github.com/docmost/docmost.git
synced 2026-05-24 03:02:42 +08:00
feat(base): disable type-conversion API for v1, preserve engine for v2
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
IsIn,
|
IsEmpty,
|
||||||
IsNotEmpty,
|
IsNotEmpty,
|
||||||
IsObject,
|
IsObject,
|
||||||
IsOptional,
|
IsOptional,
|
||||||
IsString,
|
IsString,
|
||||||
IsUUID,
|
IsUUID,
|
||||||
} from 'class-validator';
|
} from 'class-validator';
|
||||||
import { BASE_PROPERTY_TYPES } from '../base.schemas';
|
|
||||||
|
|
||||||
export class UpdatePropertyDto {
|
export class UpdatePropertyDto {
|
||||||
@IsUUID()
|
@IsUUID()
|
||||||
@@ -20,8 +19,14 @@ export class UpdatePropertyDto {
|
|||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
name?: string;
|
name?: string;
|
||||||
|
|
||||||
@IsOptional()
|
/*
|
||||||
@IsIn(BASE_PROPERTY_TYPES)
|
* Type changes are intentionally not exposed via the API in v1. The
|
||||||
|
* conversion engine in apps/server/src/core/base/engine/ and the
|
||||||
|
* worker in tasks/base-type-conversion.task.ts remain intact for
|
||||||
|
* a future v2 re-wire. Requests including `type` are rejected here
|
||||||
|
* so the service's type-change branches stay unreachable.
|
||||||
|
*/
|
||||||
|
@IsEmpty()
|
||||||
type?: string;
|
type?: string;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
|
|||||||
Reference in New Issue
Block a user