fix: Update parameter destructuring in GET functions for consistency

This commit is contained in:
2025-10-16 09:39:13 +02:00
parent 9edc3ca1ec
commit 0e4f4f5fd3
2 changed files with 4 additions and 2 deletions

View File

@@ -5,8 +5,9 @@ if (!process.env.DISCORD_BOT_TOKEN || !process.env.DISCORD_CHANNEL_ID) {
throw new Error('Discord bot token or channel ID is not configured');
}
export async function GET(request: Request, { params }: any) {
export async function GET(request: Request, context: any) {
try {
const params = await context.params;
const file_id = params.file_id as string;
const part_index = params.part_index as string;

View File

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