Rank change system UI first pass

This commit is contained in:
2025-12-16 18:47:56 -05:00
parent 7990c86a86
commit e0d9eeae92
5 changed files with 349 additions and 52 deletions

View File

@@ -1,22 +1,17 @@
export type Rank = {
id: number
name: string
short_name: string
sortOrder: number
}
import { Rank } from '@shared/types/rank'
// @ts-ignore
const addr = import.meta.env.VITE_APIHOST;
export async function getRanks(): Promise<Rank[]> {
const res = await fetch(`${addr}/ranks`)
export async function getAllRanks(): Promise<Rank[]> {
const res = await fetch(`${addr}/ranks`, {
credentials: 'include'
})
if (res.ok) {
return res.json()
} else {
console.error("Something went wrong approving the application")
}
}
// Placeholder: submit a rank change