···7272 const isToEndDay = to && endOfDay(to).getTime() === to.getTime();
73737474 if (sameDay) {
7575+ if (from.getTime() === to.getTime()) {
7676+ return formatDateTime(from);
7777+ }
7578 if (from && to) {
7679 return `${formatDateTime(from)} - ${formatTime(to)}`;
7780 }
+15
packages/api/src/router/statusPage.utils.ts
···156156 const firstUpdate = updates[0];
157157 const lastUpdate = updates[updates.length - 1];
158158 if (!firstUpdate?.date || firstUpdate.date < pastThreshod) return;
159159+160160+ // HACKY: LEGACY: we shouldn't have report.status anymore and instead use the update status for that.
161161+ // Ideally, we could replace the status with "downtime", "degraded", "operational" to indicate the gravity of the issue
162162+ if (report.status === "resolved") {
163163+ events.push({
164164+ id: report.id,
165165+ name: report.title,
166166+ from: firstUpdate?.date,
167167+ to: lastUpdate?.date,
168168+ type: "report",
169169+ status: "success" as const,
170170+ });
171171+ return;
172172+ }
173173+159174 events.push({
160175 id: report.id,
161176 name: report.title,