@budibase/server 2.4.39 → 2.4.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/server",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.4.39",
4
+ "version": "2.4.41",
5
5
  "description": "Budibase Web Server",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -43,12 +43,12 @@
43
43
  "license": "GPL-3.0",
44
44
  "dependencies": {
45
45
  "@apidevtools/swagger-parser": "10.0.3",
46
- "@budibase/backend-core": "^2.4.39",
47
- "@budibase/client": "^2.4.39",
48
- "@budibase/pro": "2.4.38",
49
- "@budibase/shared-core": "^2.4.39",
50
- "@budibase/string-templates": "^2.4.39",
51
- "@budibase/types": "^2.4.39",
46
+ "@budibase/backend-core": "^2.4.41",
47
+ "@budibase/client": "^2.4.41",
48
+ "@budibase/pro": "2.4.40",
49
+ "@budibase/shared-core": "^2.4.41",
50
+ "@budibase/string-templates": "^2.4.41",
51
+ "@budibase/types": "^2.4.41",
52
52
  "@bull-board/api": "3.7.0",
53
53
  "@bull-board/koa": "3.9.4",
54
54
  "@elastic/elasticsearch": "7.10.0",
@@ -175,5 +175,5 @@
175
175
  "optionalDependencies": {
176
176
  "oracledb": "5.3.0"
177
177
  },
178
- "gitHead": "6addf07a5ef8e738c97be0f6c8ea77d9b445161f"
178
+ "gitHead": "70af1866b81511c67e5f3b407507fc6f416d8786"
179
179
  }
@@ -56,13 +56,6 @@ export async function patch(ctx: UserCtx) {
56
56
  const id = inputs._id
57
57
  // don't save the ID to db
58
58
  delete inputs._id
59
- const validateResult = await utils.validate({
60
- row: inputs,
61
- tableId,
62
- })
63
- if (!validateResult.valid) {
64
- throw { validation: validateResult.errors }
65
- }
66
59
  return handleRequest(Operation.UPDATE, tableId, {
67
60
  id: breakRowIdField(id),
68
61
  row: inputs,
@@ -73,13 +66,6 @@ export async function patch(ctx: UserCtx) {
73
66
  export async function save(ctx: UserCtx) {
74
67
  const inputs = ctx.request.body
75
68
  const tableId = ctx.params.tableId
76
- const validateResult = await utils.validate({
77
- row: inputs,
78
- tableId,
79
- })
80
- if (!validateResult.valid) {
81
- throw { validation: validateResult.errors }
82
- }
83
69
  return handleRequest(Operation.CREATE, tableId, {
84
70
  row: inputs,
85
71
  includeSqlRelationships: IncludeRelationship.EXCLUDE,
@@ -133,10 +133,15 @@ export async function search(ctx: any) {
133
133
 
134
134
  export async function validate(ctx: Ctx) {
135
135
  const tableId = getTableId(ctx)
136
- ctx.body = await utils.validate({
137
- row: ctx.request.body,
138
- tableId,
139
- })
136
+ // external tables are hard to validate currently
137
+ if (isExternalTable(tableId)) {
138
+ ctx.body = { valid: true }
139
+ } else {
140
+ ctx.body = await utils.validate({
141
+ row: ctx.request.body,
142
+ tableId,
143
+ })
144
+ }
140
145
  }
141
146
 
142
147
  export async function fetchEnrichedRow(ctx: any) {