Mega recruitment pipeline overhaul

This commit is contained in:
2025-12-03 13:37:03 -05:00
parent c537ef9b60
commit b8f18c060e
13 changed files with 445 additions and 55 deletions

View File

@@ -38,12 +38,27 @@ router.get('/all', async (req, res) => {
});
router.get('/me', async (req, res) => {
let userID = req.user.id;
console.log("application/me")
try {
let application = await getMemberApplication(userID);
let app = getMemberApplication(userID);
console.log(app);
if (application === undefined)
res.sendStatus(204);
const comments: CommentRow[] = await getApplicationComments(application.id);
const output: ApplicationFull = {
application,
comments,
}
return res.status(200).json(output);
} catch (error) {
console.error('Failed to load application:', error);
return res.status(500).json(error);
}
})
// GET /application/:id
@@ -54,7 +69,7 @@ router.get('/:id', async (req, res) => {
const application = await getApplicationByID(appID);
if (application === undefined)
return res.sendStatus(204);
const comments: CommentRow[] = await getApplicationComments(appID);
const output: ApplicationFull = {