Merge branch 'fix/lucene-filtering' of github.com:Budibase/budibase into feature/multi-tenants
This commit is contained in:
commit
26582f5ceb
|
@ -1,7 +1,9 @@
|
||||||
|
import { notificationStore } from "../store"
|
||||||
|
import { ApiVersion } from "../constants"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API cache for cached request responses.
|
* API cache for cached request responses.
|
||||||
*/
|
*/
|
||||||
import { notificationStore } from "../store"
|
|
||||||
let cache = {}
|
let cache = {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,6 +24,7 @@ const makeApiCall = async ({ method, url, body, json = true }) => {
|
||||||
const headers = {
|
const headers = {
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
"x-budibase-app-id": window["##BUDIBASE_APP_ID##"],
|
"x-budibase-app-id": window["##BUDIBASE_APP_ID##"],
|
||||||
|
"x-budibase-api-version": ApiVersion,
|
||||||
...(json && { "Content-Type": "application/json" }),
|
...(json && { "Content-Type": "application/json" }),
|
||||||
...(!inBuilder && { "x-budibase-type": "client" }),
|
...(!inBuilder && { "x-budibase-type": "client" }),
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,3 +7,11 @@ export const ActionTypes = {
|
||||||
RefreshDatasource: "RefreshDatasource",
|
RefreshDatasource: "RefreshDatasource",
|
||||||
SetDataProviderQuery: "SetDataProviderQuery",
|
SetDataProviderQuery: "SetDataProviderQuery",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const ApiVersion = "1"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API Version Changelog
|
||||||
|
* v1:
|
||||||
|
* - Coerce types for search endpoint
|
||||||
|
*/
|
||||||
|
|
|
@ -28,6 +28,7 @@ class QueryBuilder {
|
||||||
|
|
||||||
setVersion(version) {
|
setVersion(version) {
|
||||||
this.version = version
|
this.version = version
|
||||||
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
setTable(tableId) {
|
setTable(tableId) {
|
||||||
|
@ -335,6 +336,7 @@ exports.paginatedSearch = async (appId, query, params) => {
|
||||||
}
|
}
|
||||||
limit = Math.min(limit, 200)
|
limit = Math.min(limit, 200)
|
||||||
const search = new QueryBuilder(appId, query)
|
const search = new QueryBuilder(appId, query)
|
||||||
|
.setVersion(params.version)
|
||||||
.setTable(params.tableId)
|
.setTable(params.tableId)
|
||||||
.setSort(params.sort)
|
.setSort(params.sort)
|
||||||
.setSortOrder(params.sortOrder)
|
.setSortOrder(params.sortOrder)
|
||||||
|
|
Loading…
Reference in New Issue