fix: Update parameter destructuring in GET functions for consistency
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user