chore: Update GET function parameters in get-theme route
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
import { getThemeFromId } from "@/lib/themes";
|
import { getThemeFromId } from "@/lib/themes";
|
||||||
import { NextApiRequest, NextApiResponse } from "next";
|
|
||||||
|
|
||||||
function getQSParamFromURL(
|
function getQSParamFromURL(
|
||||||
key: string,
|
key: string,
|
||||||
@@ -12,7 +11,7 @@ function getQSParamFromURL(
|
|||||||
return urlParams.get(key);
|
return urlParams.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function GET(request: NextApiRequest, response: NextApiResponse) {
|
export async function GET(request: Request, response: Response) {
|
||||||
const id = getQSParamFromURL("id", request.url);
|
const id = getQSParamFromURL("id", request.url);
|
||||||
if (!id) {
|
if (!id) {
|
||||||
return Response.json({ error: "id is required" });
|
return Response.json({ error: "id is required" });
|
||||||
|
|||||||
Reference in New Issue
Block a user