From 758803078093eff4a65f1ef3c70253f4de4ac635 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 6 May 2021 18:02:44 +0100 Subject: [PATCH] SMTP and template management E2E --- .../builder/src/pages/builder/_layout.svelte | 84 ++++---- .../builder/src/pages/portal/_layout.svelte | 77 ++++--- .../src/pages/portal/email/index.svelte | 193 ++++++++++++++++++ .../src/api/controllers/admin/templates.js | 2 +- .../worker/src/api/routes/admin/configs.js | 2 +- 5 files changed, 277 insertions(+), 81 deletions(-) create mode 100644 packages/builder/src/pages/portal/email/index.svelte diff --git a/packages/builder/src/pages/builder/_layout.svelte b/packages/builder/src/pages/builder/_layout.svelte index 77f8b655f5..8dcf58abb1 100644 --- a/packages/builder/src/pages/builder/_layout.svelte +++ b/packages/builder/src/pages/builder/_layout.svelte @@ -12,55 +12,47 @@ let modal -{#if $auth} - {#if $auth.user} -
-
- - +
+
+ + +
+ +
+
diff --git a/packages/worker/src/api/controllers/admin/templates.js b/packages/worker/src/api/controllers/admin/templates.js index 30c90d50bf..c65aaeea75 100644 --- a/packages/worker/src/api/controllers/admin/templates.js +++ b/packages/worker/src/api/controllers/admin/templates.js @@ -1,5 +1,5 @@ const { generateTemplateID, StaticDatabases } = require("@budibase/auth").db -const { CouchDB } = require("../../../db") +const CouchDB = require("../../../db") const { TemplateMetadata, TemplateBindings, diff --git a/packages/worker/src/api/routes/admin/configs.js b/packages/worker/src/api/routes/admin/configs.js index 9437aec588..38212ea17f 100644 --- a/packages/worker/src/api/routes/admin/configs.js +++ b/packages/worker/src/api/routes/admin/configs.js @@ -17,7 +17,7 @@ function smtpValidation() { auth: Joi.object({ type: Joi.string().valid("login", "oauth2", null), user: Joi.string().required(), - pass: Joi.string().valid("", null), + pass: Joi.string().allow("", null), }).optional(), }).unknown(true) }