Skip to content

Commit 233e1f2

Browse files
committed
fix(api): 移除未使用的参数并返回415状态码
移除未使用的provider参数,直接返回415状态码以表示不支持的媒体类型
1 parent e54b99a commit 233e1f2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/app/api/doh/[provider]/route.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ export async function POST(
245245
request: NextRequest,
246246
{ params }: { params: Promise<{ provider: string }> }
247247
) {
248-
const { provider } = await params;
249-
return handleDoH(request, provider);
248+
return new NextResponse("Unsupported Media Type", { status: 415 });
250249
}
251250

252251
export async function HEAD(

0 commit comments

Comments
 (0)