Support saving queryUI.
This commit is contained in:
parent
4d33106b45
commit
9e7ed04719
|
@ -99,10 +99,11 @@ export async function create(ctx: Ctx<CreateViewRequest, ViewResponse>) {
|
|||
|
||||
const schema = await parseSchema(view)
|
||||
|
||||
const parsedView: Omit<RequiredKeys<ViewV2>, "id" | "version" | "queryUI"> = {
|
||||
const parsedView: Omit<RequiredKeys<ViewV2>, "id" | "version"> = {
|
||||
name: view.name,
|
||||
tableId: view.tableId,
|
||||
query: view.query,
|
||||
queryUI: view.queryUI,
|
||||
sort: view.sort,
|
||||
schema,
|
||||
primaryDisplay: view.primaryDisplay,
|
||||
|
@ -132,12 +133,13 @@ export async function update(ctx: Ctx<UpdateViewRequest, ViewResponse>) {
|
|||
const { tableId } = view
|
||||
|
||||
const schema = await parseSchema(view)
|
||||
const parsedView: RequiredKeys<Omit<ViewV2, "queryUI">> = {
|
||||
const parsedView: RequiredKeys<ViewV2> = {
|
||||
id: view.id,
|
||||
name: view.name,
|
||||
version: view.version,
|
||||
tableId: view.tableId,
|
||||
query: view.query,
|
||||
queryUI: view.queryUI,
|
||||
sort: view.sort,
|
||||
schema,
|
||||
primaryDisplay: view.primaryDisplay,
|
||||
|
|
|
@ -9,7 +9,6 @@ export interface ViewResponseEnriched {
|
|||
data: ViewV2Enriched
|
||||
}
|
||||
|
||||
export interface CreateViewRequest
|
||||
extends Omit<ViewV2, "version" | "id" | "queryUI"> {}
|
||||
export interface CreateViewRequest extends Omit<ViewV2, "version" | "id"> {}
|
||||
|
||||
export interface UpdateViewRequest extends Omit<ViewV2, "queryUI"> {}
|
||||
export interface UpdateViewRequest extends ViewV2 {}
|
||||
|
|
Loading…
Reference in New Issue