diff --git a/app/api/newsletter/route.ts b/app/api/newsletter/route.ts index 33fb230c..7c0e4f81 100644 --- a/app/api/newsletter/route.ts +++ b/app/api/newsletter/route.ts @@ -47,8 +47,7 @@ async function setEmail(email) { } if (body?.category === 'CONFLICT') { - const contactId = body.message?.match(/Existing ID:\s*(?\d+)/) - ?.groups?.id + const contactId = body.message?.match(/Existing ID:\s*(\d+)/)?.[1] if (!contactId) { return false diff --git a/pages/kubernetes/[...slug].tsx b/pages/kubernetes/[...slug].tsx new file mode 100644 index 00000000..271ac717 --- /dev/null +++ b/pages/kubernetes/[...slug].tsx @@ -0,0 +1,17 @@ +import { type GetServerSideProps } from 'next' + +export const getServerSideProps: GetServerSideProps = async ({ params }) => { + const slug = params?.slug as string[] + const newPath = `/${slug.join('/')}` + + return { + redirect: { + destination: newPath, + permanent: true, + }, + } +} + +export default function KubernetesRedirect() { + return null +}