diff --git a/packages/nocodb/src/lib/services/viewColumn.svc.ts b/packages/nocodb/src/lib/services/viewColumn.svc.ts index b5d78af9e2..5660690e23 100644 --- a/packages/nocodb/src/lib/services/viewColumn.svc.ts +++ b/packages/nocodb/src/lib/services/viewColumn.svc.ts @@ -1,7 +1,7 @@ import { T } from 'nc-help'; import { validatePayload } from '../meta/api/helpers'; import { View } from '../models'; -import type { ViewColumnReqType } from 'nocodb-sdk'; +import type { ViewColumnReqType, ViewColumnUpdateReqType } from 'nocodb-sdk'; export async function columnList(param: { viewId: string }) { return await View.getColumns(param.viewId); @@ -31,9 +31,13 @@ export async function columnAdd(param: { export async function columnUpdate(param: { viewId: string; columnId: string; - // todo: add proper type for grid column in swagger - column: any; + column: ViewColumnUpdateReqType; }) { + validatePayload( + 'swagger.json#/components/schemas/ViewColumnUpdateReq', + param.column + ); + const result = await View.updateColumn( param.viewId, param.columnId,