import { NextRequest } from "next/server";
import { proxyMutate } from "../../proxy";

export async function PATCH(req: NextRequest, { params }: { params: Promise<{ isrc: string }> }) {
  const { isrc } = await params;
  return proxyMutate("PATCH", `/queue/${encodeURIComponent(isrc)}`, await req.json());
}

export async function DELETE(req: NextRequest, { params }: { params: Promise<{ isrc: string }> }) {
  const { isrc } = await params;
  return proxyMutate("DELETE", `/queue/${encodeURIComponent(isrc)}`);
}
