set up viewing of users application history
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m22s
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m22s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user