Did a whole ton of stuff, notably cloudflare tunnel hosting
This commit is contained in:
@@ -5,12 +5,11 @@ export type Rank = {
|
||||
sortOrder: number
|
||||
}
|
||||
|
||||
const addr = "localhost:3000"
|
||||
// @ts-ignore
|
||||
const addr = import.meta.env.VITE_APIHOST;
|
||||
|
||||
|
||||
// Placeholder: fetch list of ranks
|
||||
export async function getRanks(): Promise<Rank[]> {
|
||||
const res = await fetch(`http://${addr}/ranks`)
|
||||
const res = await fetch(`${addr}/ranks`)
|
||||
|
||||
if (res.ok) {
|
||||
return res.json()
|
||||
@@ -22,7 +21,7 @@ export async function getRanks(): Promise<Rank[]> {
|
||||
|
||||
// Placeholder: submit a rank change
|
||||
export async function submitRankChange(memberId: number, rankId: number): Promise<{ ok: boolean }> {
|
||||
const res = await fetch(`http://${addr}/rank`, {
|
||||
const res = await fetch(`${addr}/rank`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user