added policy system and self LOA management
This commit is contained in:
@@ -72,6 +72,23 @@ export function getAllLOAs(): Promise<LOARequest[]> {
|
||||
});
|
||||
}
|
||||
|
||||
export function getMyLOAs(): Promise<LOARequest[]> {
|
||||
return fetch(`${addr}/loa/history`, {
|
||||
method: "GET",
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then((res) => {
|
||||
if (res.ok) {
|
||||
return res.json();
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
export async function getLoaTypes(): Promise<LOAType[]> {
|
||||
const res = await fetch(`${addr}/loa/types`, {
|
||||
method: "GET",
|
||||
|
||||
Reference in New Issue
Block a user