clean up & fix build issues

This commit is contained in:
Matthias Nannt
2023-02-08 11:20:08 +01:00
parent 6bfc46042b
commit 264c931624
3 changed files with 8 additions and 5 deletions
@@ -44,7 +44,7 @@ export default function IconRadio({ element, control, onSubmit, disabled }: Icon
<RadioGroup.Option
key={option.value}
value={option.value}
className={({ checked, active }) =>
className={({ checked }) =>
clsx(
checked ? "border-transparent" : "border-slate-200 ",
/* active ? "border-brand ring-brand ring-2" : "", */
+2 -3
View File
@@ -1,13 +1,12 @@
import { IdentityProvider } from "@prisma/client";
import { prisma } from "@formbricks/database";
import { IdentityProvider } from "@prisma/client";
import { NextApiRequest, NextApiResponse } from "next";
import NextAuth from "next-auth";
import type { NextAuthOptions } from "next-auth";
import NextAuth from "next-auth";
import CredentialsProvider from "next-auth/providers/credentials";
import GitHubProvider from "next-auth/providers/github";
import { verifyPassword } from "../../../lib/auth";
import { verifyToken } from "../../../lib/jwt";
import { type } from "os";
export const authOptions: NextAuthOptions = {
providers: [
@@ -53,6 +53,10 @@ export default async function handle(req: NextApiRequest, res: NextApiResponse)
},
});
if (existingCustomer) {
let newCustomerData = { ...customerData };
if (existingCustomer.data && typeof existingCustomer.data === "object") {
newCustomerData = { ...existingCustomer.data, ...customerData };
}
// update customer
await prisma.customer.update({
where: {
@@ -62,7 +66,7 @@ export default async function handle(req: NextApiRequest, res: NextApiResponse)
},
},
data: {
data: { ...existingCustomer.data, ...customerData },
data: newCustomerData,
},
});
event.data.customer = {