set up viewing of users application history
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m22s

This commit is contained in:
2025-12-08 21:28:02 -05:00
parent 4a65596283
commit 63267ac679
7 changed files with 296 additions and 81 deletions

View File

@@ -19,9 +19,6 @@ export async function getMemberApplication(memberID: number): Promise<Applicatio
return app[0];
}
// export async function getAllMemberApplications(memberID: number): Promise<ApplicationListRow[]> {
// }
export async function getApplicationByID(appID: number): Promise<ApplicationRow> {
const sql =
@@ -49,6 +46,19 @@ export async function getApplicationList(): Promise<ApplicationListRow[]> {
return rows;
}
export async function getAllMemberApplications(memberID: number): Promise<ApplicationListRow[]> {
const sql = `SELECT
app.id,
app.member_id,
app.submitted_at,
app.app_status
FROM applications AS app WHERE app.member_id = ? ORDER BY submitted_at DESC;`;
const rows: ApplicationListRow[] = await pool.query(sql, [memberID])
return rows;
}
export async function approveApplication(id: number) {
const sql = `
UPDATE applications