Merge branch 'master' into BUDI-8562/fix-trimming-views
This commit is contained in:
commit
92c3f4dba6
|
@ -97,12 +97,12 @@ export const save = async (ctx: UserCtx<Row, Row>) => {
|
|||
gridSocket?.emitRowUpdate(ctx, row || squashed)
|
||||
}
|
||||
|
||||
export async function fetchView(ctx: any) {
|
||||
export async function fetchLegacyView(ctx: any) {
|
||||
const viewName = decodeURIComponent(ctx.params.viewName)
|
||||
|
||||
const { calculation, group, field } = ctx.query
|
||||
|
||||
ctx.body = await sdk.rows.fetchView(viewName, {
|
||||
ctx.body = await sdk.rows.fetchLegacyView(viewName, {
|
||||
calculation,
|
||||
group: calculation ? group : null,
|
||||
field,
|
||||
|
|
|
@ -2,7 +2,7 @@ import viewTemplate from "./viewBuilder"
|
|||
import { apiFileReturn } from "../../../utilities/fileSystem"
|
||||
import { csv, json, jsonWithSchema, Format, isFormat } from "./exporters"
|
||||
import { deleteView, getView, getViews, saveView } from "./utils"
|
||||
import { fetchView } from "../row"
|
||||
import { fetchLegacyView } from "../row"
|
||||
import { context, events } from "@budibase/backend-core"
|
||||
import sdk from "../../../sdk"
|
||||
import {
|
||||
|
@ -170,7 +170,7 @@ export async function exportView(ctx: Ctx) {
|
|||
ctx.params.viewName = viewName
|
||||
}
|
||||
|
||||
await fetchView(ctx)
|
||||
await fetchLegacyView(ctx)
|
||||
let rows = ctx.body as Row[]
|
||||
|
||||
let schema: TableSchema = view && view.meta && view.meta.schema
|
||||
|
|
|
@ -46,7 +46,7 @@ router
|
|||
permissions.PermissionType.TABLE,
|
||||
permissions.PermissionLevel.READ
|
||||
),
|
||||
rowController.fetchView
|
||||
rowController.fetchLegacyView
|
||||
)
|
||||
.get("/api/views", authorized(permissions.BUILDER), viewController.v1.fetch)
|
||||
.delete(
|
||||
|
|
|
@ -121,9 +121,9 @@ export async function fetchRaw(tableId: string): Promise<Row[]> {
|
|||
return pickApi(tableId).fetchRaw(tableId)
|
||||
}
|
||||
|
||||
export async function fetchView(
|
||||
export async function fetchLegacyView(
|
||||
viewName: string,
|
||||
params: ViewParams
|
||||
): Promise<Row[]> {
|
||||
return internal.fetchView(viewName, params)
|
||||
return internal.fetchLegacyView(viewName, params)
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ export async function fetchRaw(tableId: string): Promise<Row[]> {
|
|||
return rows as Row[]
|
||||
}
|
||||
|
||||
export async function fetchView(
|
||||
export async function fetchLegacyView(
|
||||
viewName: string,
|
||||
options: { calculation: string; group: string; field: string }
|
||||
): Promise<Row[]> {
|
||||
|
|
Loading…
Reference in New Issue