diff --git a/packages/backend-core/cache.js b/packages/backend-core/cache.js index 6b319357c4..c8bd3c9b6f 100644 --- a/packages/backend-core/cache.js +++ b/packages/backend-core/cache.js @@ -5,4 +5,5 @@ module.exports = { app: require("./src/cache/appMetadata"), writethrough: require("./src/cache/writethrough"), ...generic, + cache: generic, } diff --git a/packages/builder/src/pages/builder/portal/manage/email/index.svelte b/packages/builder/src/pages/builder/portal/manage/email/index.svelte index 53c881b65b..812aa5b014 100644 --- a/packages/builder/src/pages/builder/portal/manage/email/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/email/index.svelte @@ -74,7 +74,10 @@ rev: smtpConfig._rev, }) smtpConfig = { - config: {}, + type: ConfigTypes.SMTP, + config: { + secure: true, + }, } await admin.getChecklist() notifications.success(`Settings cleared`) diff --git a/packages/worker/src/api/controllers/global/configs.js b/packages/worker/src/api/controllers/global/configs.js index 6de428c1b1..54de62a2aa 100644 --- a/packages/worker/src/api/controllers/global/configs.js +++ b/packages/worker/src/api/controllers/global/configs.js @@ -17,6 +17,7 @@ const { withCache, CacheKeys, bustCache, + cache, } = require("@budibase/backend-core/cache") const { events } = require("@budibase/backend-core") const { checkAnyUserExists } = require("../../../utilities/users") @@ -365,9 +366,9 @@ exports.upload = async function (ctx) { exports.destroy = async function (ctx) { const db = getGlobalDB() const { id, rev } = ctx.params - try { await db.remove(id, rev) + await cache.delete(CacheKeys.CHECKLIST) ctx.body = { message: "Config deleted successfully" } } catch (err) { ctx.throw(err.status, err)