Fix backend url
This commit is contained in:
1 parent
4d335bfd57
commit
4600879c6e
3 files changed
+3
-3
No files matched your search
@@ -8,7 +8,7 @@ export default async function deleteUser(userId) {
|
|||||||
|
|
||||||
|
|
||||||
const res = await fetch(
|
const res = await fetch(
|
||||||
`http://${import.meta.env.VITE_API_URL}/api/users/${userId}`,
|
`${import.meta.env.VITE_API_URL}/api/users/${userId}`,
|
||||||
{
|
{
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export default async function getUserToValidate() {
|
export default async function getUserToValidate() {
|
||||||
try {
|
try {
|
||||||
const res = await fetch(`http://${import.meta.env.VITE_API_URL}/api/users/invalid`, {
|
const res = await fetch(`${import.meta.env.VITE_API_URL}/api/users/invalid`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export default async function validateUser(userId) {
|
|||||||
const csrfToken = await getXSRFToken();
|
const csrfToken = await getXSRFToken();
|
||||||
try {
|
try {
|
||||||
const res = await fetch(
|
const res = await fetch(
|
||||||
`http://${import.meta.env.VITE_API_URL}/api/users/${userId}/validate`,
|
`${import.meta.env.VITE_API_URL}/api/users/${userId}/validate`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
|
|||||||
Reference in new issue
Block a user