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 schema = await parseSchema(view)
|
||||||
|
|
||||||
const parsedView: Omit<RequiredKeys<ViewV2>, "id" | "version" | "queryUI"> = {
|
const parsedView: Omit<RequiredKeys<ViewV2>, "id" | "version"> = {
|
||||||
name: view.name,
|
name: view.name,
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
query: view.query,
|
query: view.query,
|
||||||
|
queryUI: view.queryUI,
|
||||||
sort: view.sort,
|
sort: view.sort,
|
||||||
schema,
|
schema,
|
||||||
primaryDisplay: view.primaryDisplay,
|
primaryDisplay: view.primaryDisplay,
|
||||||
|
@ -132,12 +133,13 @@ export async function update(ctx: Ctx<UpdateViewRequest, ViewResponse>) {
|
||||||
const { tableId } = view
|
const { tableId } = view
|
||||||
|
|
||||||
const schema = await parseSchema(view)
|
const schema = await parseSchema(view)
|
||||||
const parsedView: RequiredKeys<Omit<ViewV2, "queryUI">> = {
|
const parsedView: RequiredKeys<ViewV2> = {
|
||||||
id: view.id,
|
id: view.id,
|
||||||
name: view.name,
|
name: view.name,
|
||||||
version: view.version,
|
version: view.version,
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
query: view.query,
|
query: view.query,
|
||||||
|
queryUI: view.queryUI,
|
||||||
sort: view.sort,
|
sort: view.sort,
|
||||||
schema,
|
schema,
|
||||||
primaryDisplay: view.primaryDisplay,
|
primaryDisplay: view.primaryDisplay,
|
||||||
|
|
|
@ -9,7 +9,6 @@ export interface ViewResponseEnriched {
|
||||||
data: ViewV2Enriched
|
data: ViewV2Enriched
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateViewRequest
|
export interface CreateViewRequest extends Omit<ViewV2, "version" | "id"> {}
|
||||||
extends Omit<ViewV2, "version" | "id" | "queryUI"> {}
|
|
||||||
|
|
||||||
export interface UpdateViewRequest extends Omit<ViewV2, "queryUI"> {}
|
export interface UpdateViewRequest extends ViewV2 {}
|
||||||
|
|
Loading…
Reference in New Issue