Did a whole ton of stuff, notably cloudflare tunnel hosting
This commit is contained in:
@@ -5,11 +5,11 @@ export type LOARequest = {
|
||||
end_date: string; // ISO 8601 string
|
||||
reason?: string;
|
||||
};
|
||||
|
||||
const addr = "localhost:3000";
|
||||
// @ts-ignore
|
||||
const addr = import.meta.env.VITE_APIHOST;
|
||||
|
||||
export async function submitLOA(request: LOARequest): Promise<{ id?: number; error?: string }> {
|
||||
const res = await fetch(`http://${addr}/loa`, {
|
||||
const res = await fetch(`${addr}/loa`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -25,7 +25,7 @@ export async function submitLOA(request: LOARequest): Promise<{ id?: number; err
|
||||
}
|
||||
|
||||
export async function getMyLOA(): Promise<LOARequest | null> {
|
||||
const res = await fetch(`http://${addr}/loa/me`, {
|
||||
const res = await fetch(`${addr}/loa/me`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user