Feedback
This commit is contained in:
parent
4b295a45d4
commit
5e780fd3d0
|
@ -46,7 +46,7 @@ export async function getServerSession(options: {
|
|||
return cachedSession;
|
||||
}
|
||||
|
||||
const user = await prisma.user.findFirst({
|
||||
const user = await prisma.user.findUnique({
|
||||
where: {
|
||||
email: token.email.toLowerCase(),
|
||||
},
|
||||
|
|
|
@ -18,7 +18,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|||
const {
|
||||
data: { org: slug },
|
||||
} = parsedQuery;
|
||||
if (!slug) if (!slug) return res.status(400).json({ message: "Org is needed" });
|
||||
if (!slug) return res.status(400).json({ message: "Org is needed" });
|
||||
|
||||
const org = await prisma.team.findFirst({ where: { slug }, select: { children: true, metadata: true } });
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ export const isSAMLAdmin = (email: string) => {
|
|||
};
|
||||
|
||||
export const samlTenantProduct = async (prisma: PrismaClient, email: string) => {
|
||||
const user = await prisma.user.findFirst({
|
||||
const user = await prisma.user.findUnique({
|
||||
where: {
|
||||
email,
|
||||
},
|
||||
|
|
|
@ -8,7 +8,7 @@ export const WEBAPP_URL =
|
|||
RAILWAY_STATIC_URL ||
|
||||
HEROKU_URL ||
|
||||
RENDER_URL ||
|
||||
"http:/localhost:3000";
|
||||
"http://localhost:3000";
|
||||
/** @deprecated use `WEBAPP_URL` */
|
||||
export const BASE_URL = WEBAPP_URL;
|
||||
export const WEBSITE_URL = process.env.NEXT_PUBLIC_WEBSITE_URL || "https://cal.com";
|
||||
|
|
|
@ -20,7 +20,7 @@ type DeleteMeOptions = {
|
|||
|
||||
export const deleteMeHandler = async ({ ctx, input }: DeleteMeOptions) => {
|
||||
// Check if input.password is correct
|
||||
const user = await prisma.user.findFirst({
|
||||
const user = await prisma.user.findUnique({
|
||||
where: {
|
||||
email: ctx.user.email.toLowerCase(),
|
||||
},
|
||||
|
|
|
@ -50,7 +50,7 @@ const vercelCreateDomain = async (domain: string) => {
|
|||
export const createHandler = async ({ input }: CreateOptions) => {
|
||||
const { slug, name, adminEmail, adminUsername, check } = input;
|
||||
|
||||
const userCollisions = await prisma.user.findFirst({
|
||||
const userCollisions = await prisma.user.findUnique({
|
||||
where: {
|
||||
email: adminEmail,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user