fix: Simplify parameter destructuring in GET function

This commit is contained in:
2025-10-16 09:17:57 +02:00
parent f51a571536
commit cd0e485f80

View File

@@ -2,9 +2,9 @@ import { NextResponse } from 'next/server';
import pool from '@/lib/db'; import pool from '@/lib/db';
import bcrypt from 'bcrypt'; import bcrypt from 'bcrypt';
export async function GET(request: Request, context: { params: { file_id: string } }) { export async function GET(request: Request, { params }: any) {
try { try {
const file_id = context.params.file_id; const file_id = params.file_id as string;
const { searchParams } = new URL(request.url); const { searchParams } = new URL(request.url);
const token = searchParams.get('token'); const token = searchParams.get('token');