Did more stuff than I even wanna write. Notably:
- Auth/account management - Navigation system - Admin views for LOA stuff
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
export type LOARequest = {
|
||||
id: number;
|
||||
name?: string;
|
||||
member_id: number;
|
||||
filed_date: string; // ISO 8601 string
|
||||
start_date: string; // ISO 8601 string
|
||||
@@ -43,3 +45,18 @@ export async function getMyLOA(): Promise<LOARequest | null> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export function getAllLOAs(): Promise<LOARequest[]> {
|
||||
return fetch(`${addr}/loa/all`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then((res) => {
|
||||
if (res.ok) {
|
||||
return res.json();
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user