From c8dc7a9cbeb6044cd781d8fe2f38b7e4833d3a25 Mon Sep 17 00:00:00 2001 From: Lucemans Date: Fri, 15 Nov 2024 07:57:24 +0100 Subject: [PATCH] Bump --- web/src/App.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index f7750c2..dad04cb 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -2,17 +2,20 @@ import './global.css'; import { useMutation } from '@tanstack/react-query'; -export const BACKEND_URL = 'https://poap-distributor.c5.v3x.systems'; +export const BACKEND_URL = 'https://music-poap-distributor.c5.v3x.systems'; export const App = () => { const { mutate } = useMutation({ mutationFn: async () => { - // fetch poap from backend url /poap and if successfull redirect user to link inside {data: 'https://...'} - const response = await fetch(`${BACKEND_URL}/poap`); + const response = await fetch(`${BACKEND_URL}/poap`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + }); const data = await response.json(); if (response.ok) { - // eslint-disable-next-line no-undef window.location.href = data.data; } },