Compare commits
19
Commits
v2.0
...
471c0c7a49
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
471c0c7a49 | ||
|
|
75ff65e76b | ||
|
|
7cf1245ef6 | ||
|
|
2adbfa75a5 | ||
|
|
216a1cb1d4 | ||
|
|
7fc98d6c9f | ||
|
|
e346cf9445 | ||
|
|
c030b6dbe6 | ||
|
|
6f26b9bbc3 | ||
|
|
a34a70572f | ||
|
|
4b3c8a2424 | ||
|
|
568b3bf495 | ||
|
|
5653d32857 | ||
|
|
7cf5b8df48 | ||
|
|
65c5fc0f8f | ||
|
|
b626a67907 | ||
|
|
6643a176a6 | ||
|
|
89803754a7 | ||
|
|
5052b3e83a |
@@ -51,7 +51,7 @@ export const MainForm = () => {
|
||||
// Fetch user data or any other data needed for the form
|
||||
try {
|
||||
const fetchUsers = async () => {
|
||||
const response = await fetch("http://localhost:8004/default/users");
|
||||
const response = await fetch("/backend/default/users");
|
||||
const data = await response.json();
|
||||
setUsers(data.users);
|
||||
};
|
||||
@@ -80,7 +80,7 @@ export const MainForm = () => {
|
||||
const confirmUser = async (selectedUser: string) => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`http://localhost:8004/default/confirm-user?username=${selectedUser}`,
|
||||
`/backend/default/confirm-user?username=${selectedUser}`
|
||||
);
|
||||
const data = await response.json();
|
||||
setNextID(data.nextID);
|
||||
|
||||
@@ -17,16 +17,13 @@ interface FormData {
|
||||
export const submitFormData = async (data: FormData, username: string) => {
|
||||
console.log(data);
|
||||
try {
|
||||
const response = await fetch(
|
||||
`http://localhost:8004/default/new-entry?username=${username}`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(data),
|
||||
const response = await fetch(`/backend/default/new-entry?username=${username}`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
);
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
const errorText = await response.text();
|
||||
|
||||
Reference in New Issue
Block a user