Compare commits
2 Commits
dev
...
89803754a7
| Author | SHA1 | Date | |
|---|---|---|---|
| 89803754a7 | |||
| 5052b3e83a |
@@ -121,7 +121,7 @@ export const MainForm = () => {
|
|||||||
: null,
|
: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await fetch("http://localhost:8004/default/frontend", {
|
const response = await fetch("/backend/default/frontend", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify(payload),
|
body: JSON.stringify(payload),
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export const MainForm = () => {
|
|||||||
// Fetch user data or any other data needed for the form
|
// Fetch user data or any other data needed for the form
|
||||||
try {
|
try {
|
||||||
const fetchUsers = async () => {
|
const fetchUsers = async () => {
|
||||||
const response = await fetch("http://localhost:8004/default/users");
|
const response = await fetch("/backend/default/users");
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
setUsers(data.users);
|
setUsers(data.users);
|
||||||
};
|
};
|
||||||
@@ -78,7 +78,7 @@ export const MainForm = () => {
|
|||||||
const confirmUser = async (selectedUser: string) => {
|
const confirmUser = async (selectedUser: string) => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`http://localhost:8004/default/confirm-user?username=${selectedUser}`
|
`/backend/default/confirm-user?username=${selectedUser}`
|
||||||
);
|
);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
setNextID(data.nextID);
|
setNextID(data.nextID);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ interface FormData {
|
|||||||
|
|
||||||
export const submitFormData = async (data: FormData, username: string) => {
|
export const submitFormData = async (data: FormData, username: string) => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`http://localhost:8004/default/new-entry?username=${username}`, {
|
const response = await fetch(`/backend/default/new-entry?username=${username}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
Reference in New Issue
Block a user