Rank change system UI first pass
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user