|
@@ -5,11 +5,12 @@ const prisma = new PrismaClient();
|
|
|
|
|
|
|
|
export const GET = async (
|
|
export const GET = async (
|
|
|
req: NextRequest,
|
|
req: NextRequest,
|
|
|
- { params }: { params: { id: string } }
|
|
|
|
|
|
|
+ { params }: { params: Promise<{ id: string }> }
|
|
|
) => {
|
|
) => {
|
|
|
|
|
+ const { id } = await params;
|
|
|
try {
|
|
try {
|
|
|
const file = await prisma.file.findUnique({
|
|
const file = await prisma.file.findUnique({
|
|
|
- where: { id: params.id },
|
|
|
|
|
|
|
+ where: { id },
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
if (!file) {
|
|
if (!file) {
|