fix: remove unnecessary URL allocation (#2554)

This commit is contained in:
Marvin Hagemeister
2024-06-27 12:34:56 +02:00
committed by GitHub
parent bfb5753ecb
commit 138d4c457c
4 changed files with 5 additions and 3 deletions
+1 -2
View File
@@ -5,8 +5,7 @@ import { define } from "../utils/state.ts";
export const handler = define.handlers({
GET(ctx) {
const url = new URL(ctx.req.url);
const search = new URLSearchParams(url.search);
const search = new URLSearchParams(ctx.url.search);
const vote = search.get("vote");
return page({ vote });
},