mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-21 19:39:28 -05:00
clean up & fix build issues
This commit is contained in:
@@ -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" : "", */
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user