diff --git a/sites/backend/src/config.mjs b/sites/backend/src/config.mjs
index 8bfa8bc86ae..686fdc56f23 100644
--- a/sites/backend/src/config.mjs
+++ b/sites/backend/src/config.mjs
@@ -182,13 +182,11 @@ if (baseConfig.use.cloudflareImages) {
}
// FowardMx config
-if (baseConfig.use.fowardmx) {
- const account = process.env.BACKEND_CLOUDFLARE_ACCOUNT || 'fixmeSetCloudflareAccountId'
+if (baseConfig.use.fowardmx)
baseConfig.forwardmx = {
key: process.env.BACKEND_FORWARDMX_KEY || 'fixmeSetFowardMxApiKey',
useInTests: baseConfig.use.tests.fowardmx,
}
-}
// AWS SES config (for sending out emails)
if (baseConfig.use.ses)
@@ -231,7 +229,7 @@ const config = postConfig(baseConfig)
// Exporting this stand-alone config
export const cloudflareImages = config.cloudflareImages || {}
-export const fowardmx = config.fowardmx || {}
+export const forwardmx = config.forwardmx || {}
export const website = config.website
export const githubToken = config.github.token
diff --git a/sites/backend/src/models/admin.mjs b/sites/backend/src/models/admin.mjs
index e7a41f76de3..7b57330d6b9 100644
--- a/sites/backend/src/models/admin.mjs
+++ b/sites/backend/src/models/admin.mjs
@@ -1,4 +1,3 @@
-import { log } from '../utils/log.mjs'
import { decorateModel } from '../utils/model-decorator.mjs'
/*
@@ -123,7 +122,7 @@ AdminModel.prototype.updateUser = async function ({ params, body, user }) {
/*
* Disable MFA?
*/
- if (body.mfaEnabled && body.mfaEnabled === false) {
+ if (typeof body.mfaEnabled !== 'undefined' && body.mfaEnabled === false) {
data.mfaEnabled = false
data.mfaSecret = ''
}
diff --git a/sites/backend/src/models/flow.mjs b/sites/backend/src/models/flow.mjs
index 871dd496a15..b4fd06771ee 100644
--- a/sites/backend/src/models/flow.mjs
+++ b/sites/backend/src/models/flow.mjs
@@ -160,7 +160,7 @@ FlowModel.prototype.uploadImage = async function ({ body, user }) {
* Prepare data for uploading the image
*/
const data = {
- id: `${body.type}-${body.slug}${body.subId && body.subId !== 'main' ? '-' + body.subId : ''}`,
+ id: `${body.type}-${body.slug}${body.subId !== 'main' ? '-' + body.subId : ''}`,
metadata: { uploadedBy: user.uid },
}
if (body.img) data.b64 = body.img
diff --git a/sites/org/components/github/create-showcase.mjs b/sites/org/components/github/create-showcase.mjs
index 926e701cdcf..311730378de 100644
--- a/sites/org/components/github/create-showcase.mjs
+++ b/sites/org/components/github/create-showcase.mjs
@@ -1,7 +1,7 @@
// Dependencies
import { nsMerge, capitalize, cloudflareImageUrl, yyyymmdd } from 'shared/utils.mjs'
// Hooks
-import { useState } from 'react'
+import { useState, Fragment } from 'react'
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
import { useTranslation } from 'next-i18next'
@@ -436,7 +436,7 @@ const ShowcaseEditor = ({
cloudflareImageUrl({ id: extraImages[key], variant: 'public' }) +
' "The image caption/title goes here")'
return (
- <>
+
setExtraImg(key, img)}
@@ -459,7 +459,7 @@ const ShowcaseEditor = ({
>
)}
- >
+
)
})}