1
0
Fork 0
mirror of synced 2024-07-02 21:10:43 +12:00

Merge branch 'bug/sev3/reset-email-config-delete-cache' into bug/sev3/reset-email-config-delete-cache-dev

This commit is contained in:
Mel O'Hagan 2022-07-08 14:50:47 +01:00
commit c3bc39f600
3 changed files with 7 additions and 2 deletions

View file

@ -5,4 +5,5 @@ module.exports = {
app: require("./src/cache/appMetadata"),
writethrough: require("./src/cache/writethrough"),
...generic,
cache: generic,
}

View file

@ -74,7 +74,10 @@
rev: smtpConfig._rev,
})
smtpConfig = {
config: {},
type: ConfigTypes.SMTP,
config: {
secure: true,
},
}
await admin.getChecklist()
notifications.success(`Settings cleared`)

View file

@ -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)
cache.delete(CacheKeys.CHECKLIST)
ctx.body = { message: "Config deleted successfully" }
} catch (err) {
ctx.throw(err.status, err)