export async function retrieveAuditById()

in src/api/audits/db.ts [80:90]


export async function retrieveAuditById(
  conn: DbConnectionType,
  auditId: string,
): Promise<Audit> {
  const res = await retrieveAuditList(conn, {
    where: SQL`WHERE id = ${auditId}`,
  });
  if (res.length === 0)
    throw new NotFoundError(`audit not found for id "${auditId}"`);
  return res[0];
}