hooked up recruiter application management page

This commit is contained in:
2025-09-04 10:36:36 -04:00
parent caa6ffd41a
commit ea98cafe8c
5 changed files with 17 additions and 6 deletions

View File

@@ -69,11 +69,11 @@ export enum Status {
Accepted = "Accepted",
Denied = "Denied",
}
const addr = "localhost:3000"
export async function loadApplication(): Promise<ApplicationFull | null> {
const res = await fetch(`http://${addr}/application/me`)
export async function loadApplication(id: number | string): Promise<ApplicationFull | null> {
const res = await fetch(`http://${addr}/application/${id}`)
if (res.status === 204) return null
if (!res.ok) throw new Error('Failed to load application')
const json = await res.json()