diff --git a/packages/worker/src/api/routes/tests/utilities/TestConfiguration.js b/packages/worker/src/api/routes/tests/utilities/TestConfiguration.js index 06a0d8e548..0f97b50c82 100644 --- a/packages/worker/src/api/routes/tests/utilities/TestConfiguration.js +++ b/packages/worker/src/api/routes/tests/utilities/TestConfiguration.js @@ -84,7 +84,9 @@ class TestConfiguration { controllers.config.destroy ) } - } catch (err) {} + } catch (err) { + // don't need to handle error + } } async saveSettingsConfig() { diff --git a/packages/worker/src/constants/index.js b/packages/worker/src/constants/index.js index 141a742ce0..f5702d3e96 100644 --- a/packages/worker/src/constants/index.js +++ b/packages/worker/src/constants/index.js @@ -43,6 +43,8 @@ const TemplateBindings = { REQUEST: "request", DOCS_URL: "docsUrl", LOGIN_URL: "loginUrl", + CURRENT_YEAR: "currentYear", + CURRENT_DATE: "currentDate", } const TemplateMetadata = { diff --git a/packages/worker/src/constants/templates/base.hbs b/packages/worker/src/constants/templates/base.hbs index f804605020..ba0571db0b 100644 --- a/packages/worker/src/constants/templates/base.hbs +++ b/packages/worker/src/constants/templates/base.hbs @@ -24,7 +24,7 @@ diff --git a/packages/worker/src/utilities/templates.js b/packages/worker/src/utilities/templates.js index 8bb2ba9e95..3035dc2bbc 100644 --- a/packages/worker/src/utilities/templates.js +++ b/packages/worker/src/utilities/templates.js @@ -31,5 +31,7 @@ exports.getSettingsTemplateContext = async () => { [TemplateBindings.DOCS_URL]: settings.docsUrl || "https://docs.budibase.com/", [TemplateBindings.LOGIN_URL]: checkSlashesInUrl(`${URL}/login`), + [TemplateBindings.CURRENT_DATE]: new Date().toISOString(), + [TemplateBindings.CURRENT_YEAR]: new Date().getFullYear(), } }