Skip to content

Bsl 37 patch status update route#28

Open
Junny20 wants to merge 4 commits intomainfrom
bsl-37-patch-status-update-route
Open

Bsl 37 patch status update route#28
Junny20 wants to merge 4 commits intomainfrom
bsl-37-patch-status-update-route

Conversation

@Junny20
Copy link
Copy Markdown
Contributor

@Junny20 Junny20 commented Mar 2, 2026

No description provided.

Comment on lines +1 to +5
import { NextRequest, NextResponse } from "next/server";
import { PrismaClient, Role } from "@/generated/prisma/client";
import { auth } from "@/auth";

export async function GET() {
const prisma = new PrismaClient();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I messed this up when resolving the merge conflicts, but the import statements should be:

import { NextRequest, NextResponse } from "next/server";
import { Role, Prisma } from "@/generated/prisma/client";
import { prisma } from "@/lib/prisma";
import { auth } from "@/auth";

and remove the const prisma = new PrismaClient(); entirely

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the PrismaClient shouldn't be imported here (use the singleton instead)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants