Merge pull request #6619 from Budibase/bug/sev3/reset-email-config-delete-cache-dev
Reset email config delete cache
This commit is contained in:
commit
f0d823648a
|
@ -5,4 +5,5 @@ module.exports = {
|
||||||
app: require("./src/cache/appMetadata"),
|
app: require("./src/cache/appMetadata"),
|
||||||
writethrough: require("./src/cache/writethrough"),
|
writethrough: require("./src/cache/writethrough"),
|
||||||
...generic,
|
...generic,
|
||||||
|
cache: generic,
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,10 @@
|
||||||
rev: smtpConfig._rev,
|
rev: smtpConfig._rev,
|
||||||
})
|
})
|
||||||
smtpConfig = {
|
smtpConfig = {
|
||||||
config: {},
|
type: ConfigTypes.SMTP,
|
||||||
|
config: {
|
||||||
|
secure: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
await admin.getChecklist()
|
await admin.getChecklist()
|
||||||
notifications.success(`Settings cleared`)
|
notifications.success(`Settings cleared`)
|
||||||
|
|
|
@ -17,6 +17,7 @@ const {
|
||||||
withCache,
|
withCache,
|
||||||
CacheKeys,
|
CacheKeys,
|
||||||
bustCache,
|
bustCache,
|
||||||
|
cache,
|
||||||
} = require("@budibase/backend-core/cache")
|
} = require("@budibase/backend-core/cache")
|
||||||
const { events } = require("@budibase/backend-core")
|
const { events } = require("@budibase/backend-core")
|
||||||
const { checkAnyUserExists } = require("../../../utilities/users")
|
const { checkAnyUserExists } = require("../../../utilities/users")
|
||||||
|
@ -365,9 +366,9 @@ exports.upload = async function (ctx) {
|
||||||
exports.destroy = async function (ctx) {
|
exports.destroy = async function (ctx) {
|
||||||
const db = getGlobalDB()
|
const db = getGlobalDB()
|
||||||
const { id, rev } = ctx.params
|
const { id, rev } = ctx.params
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await db.remove(id, rev)
|
await db.remove(id, rev)
|
||||||
|
await cache.delete(CacheKeys.CHECKLIST)
|
||||||
ctx.body = { message: "Config deleted successfully" }
|
ctx.body = { message: "Config deleted successfully" }
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
ctx.throw(err.status, err)
|
ctx.throw(err.status, err)
|
||||||
|
|
Loading…
Reference in New Issue