Skip to content

Commit 6e481eb

Browse files
committed
Backend: getChartData - logging to check date counting method
1 parent 64acb16 commit 6e481eb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

apps/backend/routes/auth/getAuditChart.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ export const getAuditChart = async () => {
3131
variables: { audit_id: auditId },
3232
};
3333

34-
console.log(JSON.stringify({ query }));
34+
//console.log(JSON.stringify({ query }));
3535
const response = await graphqlQuery(query);
36-
console.log(JSON.stringify({ response }));
36+
//console.log(JSON.stringify({ response }));
3737

3838
const scans = response.audits_by_pk?.scans || [];
3939

@@ -45,7 +45,10 @@ export const getAuditChart = async () => {
4545

4646
scans.forEach((scan:any) => {
4747
const scanDate = new Date(scan.created_at);
48+
console.log("scan.created_at", scan.created_at);
49+
console.log("scanDate", scanDate);
4850
const dateKey = scanDate.toISOString().split("T")[0]; // YYYY-MM-DD format
51+
console.log("dateKey", dateKey)
4952
const blockerCount = scan.blockers_aggregate?.aggregate?.count || 0;
5053

5154
// Only keep the last scan for each day (scans are ordered by created_at asc)

0 commit comments

Comments
 (0)