Fix requests base URL
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { ConfigResponse, ImportOptions, PrepareResponse, SubmitResponse, Transaction } from "../types/api";
|
||||
|
||||
export async function fetchConfig(): Promise<ConfigResponse> {
|
||||
const response = await fetch("http://localhost:3000/config")
|
||||
const response = await fetch("/config")
|
||||
const data = await response.json();
|
||||
return data as ConfigResponse;
|
||||
}
|
||||
@@ -12,7 +12,7 @@ export async function loadTransactions(csvFile: File, profile: string, server: s
|
||||
payload.append("profile", profile);
|
||||
payload.append("server", server);
|
||||
|
||||
const response = await fetch("http://localhost:3000/prepare", {
|
||||
const response = await fetch("/prepare", {
|
||||
method: "POST",
|
||||
body: payload
|
||||
});
|
||||
@@ -28,7 +28,7 @@ export async function submitTransactions(transactions: Transaction[], server: st
|
||||
opts
|
||||
};
|
||||
|
||||
const response = await fetch("http://localhost:3000/submit", {
|
||||
const response = await fetch("/submit", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(payload),
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user