(date: Date)
| 12 | if (ids.length === 0) return Response.json({} satisfies Result) |
| 13 | |
| 14 | const toInterval = (date: Date) => |
| 15 | parseInt( |
| 16 | date |
| 17 | .toISOString() |
| 18 | .replace(/[^0-9]/g, "") |
| 19 | .substring(0, 12), |
| 20 | ) |
| 21 | const now = Date.now() |
| 22 | const intervals = Array.from({ length: 30 }, (_, i) => toInterval(new Date(now - i * 60 * 1000))) |
| 23 |