Martin McKeaveney
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
1 deletions
-
packages/builder/src/builderStore/store/backend.js
-
packages/server/src/api/routes/query.js
|
|
|
@ -135,6 +135,9 @@ export const getBackendUiStore = () => { |
|
|
|
} |
|
|
|
query.datasourceId = datasourceId |
|
|
|
const response = await api.post(`/api/queries`, query) |
|
|
|
if (response.status !== 200) { |
|
|
|
throw new Error("Failed saving query.") |
|
|
|
} |
|
|
|
const json = await response.json() |
|
|
|
store.update(state => { |
|
|
|
const currentIdx = state.queries.findIndex( |
|
|
|
|
|
|
|
@ -27,7 +27,7 @@ function generateQueryValidation() { |
|
|
|
readable: Joi.boolean(), |
|
|
|
parameters: Joi.array().items(Joi.object({ |
|
|
|
name: Joi.string(), |
|
|
|
default: Joi.string() |
|
|
|
default: Joi.string().allow(""), |
|
|
|
})), |
|
|
|
queryVerb: Joi.string().allow().required(), |
|
|
|
schema: Joi.object({}).required().unknown(true) |
|
|
|
|