From e37e5d137ce5c56aabedcdee02f2067ebafac29c Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 17 Feb 2022 10:12:35 +0100 Subject: [PATCH] bug fix for handlebars expression, show budibase version in updates panel --- .../src/components/common/bindings/BindingPanel.svelte | 2 +- packages/frontend-core/src/api/other.js | 2 +- packages/server/src/api/controllers/dev.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte index 5c12d43ceb..2dfb3fda54 100644 --- a/packages/builder/src/components/common/bindings/BindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte @@ -58,7 +58,7 @@ const updateValue = val => { valid = isValid(readableToRuntimeBinding(bindings, val)) if (valid) { - dispatch("change", value) + dispatch("change", val) } } diff --git a/packages/frontend-core/src/api/other.js b/packages/frontend-core/src/api/other.js index b2a5ccf441..e7b446c181 100644 --- a/packages/frontend-core/src/api/other.js +++ b/packages/frontend-core/src/api/other.js @@ -32,7 +32,7 @@ export const buildOtherEndpoints = API => ({ getBudibaseVersion: async () => { return await API.get({ url: "/api/dev/version", - }) + }).version }, /** diff --git a/packages/server/src/api/controllers/dev.js b/packages/server/src/api/controllers/dev.js index bec9478245..54f554e358 100644 --- a/packages/server/src/api/controllers/dev.js +++ b/packages/server/src/api/controllers/dev.js @@ -118,5 +118,7 @@ exports.revert = async ctx => { } exports.getBudibaseVersion = async ctx => { - ctx.body = require("../../../package.json").version + ctx.body = { + version: require("../../../package.json").version, + } }