Fix dashboard not working for 7 days

This commit is contained in:
KMKoushik
2024-05-03 19:41:15 +10:00
parent 4e671556cc
commit f8312fe63d
2 changed files with 5 additions and 1 deletions

1
.gitignore vendored
View File

@@ -36,3 +36,4 @@ yarn-error.log*
# Misc
.DS_Store
*.pem
prod_db.tar

View File

@@ -125,7 +125,6 @@ export const emailRouter = createTRPCRouter({
(acc, { latestStatus, createdAt }) => {
const day = format(createdAt, "MMM dd");
console.log(day);
if (
!day ||
![
@@ -139,6 +138,10 @@ export const emailRouter = createTRPCRouter({
return acc;
}
if (!acc[day]) {
return acc;
}
acc[day]![
latestStatus as
| "DELIVERED"