1 2 3 4 5 6 7 8 9 10 11import { db, event } from '#src/utils'; export const getAuditProgress = async () => { await db.connect(); const row = (await db.query({ text: `SELECT * FROM "audits" WHERE "id"=$1 AND "organization_id"=$2`, values: [event.queryStringParameters.id, event.claims.profile], })).rows?.[0]; await db.clean(); return row; }