implemented some recruiter view features

This commit is contained in:
2025-08-25 16:49:00 -04:00
parent 9a40cd3967
commit 3dadaf3b24
5 changed files with 106 additions and 18 deletions

View File

@@ -50,7 +50,7 @@ export async function postApplication(val: any) {
}
export async function postChatMessage(val: any) {
let output = {
message: val,
sender: 1,
@@ -62,4 +62,30 @@ export async function postChatMessage(val: any) {
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(output),
})
}
export async function getAllApplications() {
const res = await fetch(`http://${addr}/application/all`)
if (res.ok) {
return await res.json();
} else {
console.error("Something went wrong approving the application")
}
}
export async function approveApplication(id: Number) {
const res = await fetch(`http://${addr}/application/approve/${id}`, { method: 'POST' })
if (!res.ok) {
console.error("Something went wrong approving the application")
}
}
export async function denyApplication(id: Number) {
const res = await fetch(`http://${addr}/application/deny/${id}`, { method: 'POST' })
if (!res.ok) {
console.error("Something went wrong approving the application")
}
}