Skip to content

Commit 6c86720

Browse files
committed
fix(fetch): use URL() to safely construct endpoint #36
1 parent 8a55464 commit 6c86720

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/controllers/member.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export async function getMembers() {
2-
const res = await fetch(`${process.env.NEXT_PUBLIC_BACKEND_URL}/members`);
2+
const res = await fetch(new URL(`/members`, process.env.NEXT_PUBLIC_BACKEND_URL));
33

44
if (!res.ok) {
55
throw new Error("Error al obtener miembros");

0 commit comments

Comments
 (0)