tweaked get app query to support multiple applications
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m23s
Some checks failed
Continuous Deployment / Update Deployment (push) Failing after 1m23s
This commit is contained in:
@@ -13,12 +13,16 @@ export async function getMemberApplication(memberID: number): Promise<Applicatio
|
||||
member.name AS member_name
|
||||
FROM applications AS app
|
||||
INNER JOIN members AS member ON member.id = app.member_id
|
||||
WHERE app.member_id = ?;`;
|
||||
WHERE app.member_id = ? ORDER BY submitted_at DESC LIMIT 1;`;
|
||||
|
||||
let app: ApplicationRow[] = await pool.query(sql, [memberID]);
|
||||
return app[0];
|
||||
}
|
||||
|
||||
// export async function getAllMemberApplications(memberID: number): Promise<ApplicationListRow[]> {
|
||||
|
||||
// }
|
||||
|
||||
export async function getApplicationByID(appID: number): Promise<ApplicationRow> {
|
||||
const sql =
|
||||
`SELECT app.*,
|
||||
|
||||
Reference in New Issue
Block a user