|
|
@ -11,7 +11,7 @@ import Project from '../models/Project'; |
|
|
|
import syncMigration from '../meta/helpers/syncMigration'; |
|
|
|
import syncMigration from '../meta/helpers/syncMigration'; |
|
|
|
import { populateMeta, validatePayload } from '../meta/api/helpers'; |
|
|
|
import { populateMeta, validatePayload } from '../meta/api/helpers'; |
|
|
|
import { extractPropsAndSanitize } from '../meta/helpers/extractProps'; |
|
|
|
import { extractPropsAndSanitize } from '../meta/helpers/extractProps'; |
|
|
|
import type { ProjectReqType } from 'nocodb-sdk'; |
|
|
|
import type { ProjectReqType, ProjectUpdateReqType } from 'nocodb-sdk'; |
|
|
|
|
|
|
|
|
|
|
|
export async function projectCreate(param: { |
|
|
|
export async function projectCreate(param: { |
|
|
|
project: ProjectReqType; |
|
|
|
project: ProjectReqType; |
|
|
@ -136,8 +136,13 @@ export function sanitizeProject(project: any) { |
|
|
|
|
|
|
|
|
|
|
|
export async function projectUpdate(param: { |
|
|
|
export async function projectUpdate(param: { |
|
|
|
projectId: string; |
|
|
|
projectId: string; |
|
|
|
project: ProjectReqType; |
|
|
|
project: ProjectUpdateReqType; |
|
|
|
}) { |
|
|
|
}) { |
|
|
|
|
|
|
|
validatePayload( |
|
|
|
|
|
|
|
'swagger.json#/components/schemas/ProjectUpdateReq', |
|
|
|
|
|
|
|
param.project |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const project = await Project.getWithInfo(param.projectId); |
|
|
|
const project = await Project.getWithInfo(param.projectId); |
|
|
|
|
|
|
|
|
|
|
|
const data: Partial<Project> = extractPropsAndSanitize( |
|
|
|
const data: Partial<Project> = extractPropsAndSanitize( |
|
|
|