Compare commits

..

2 Commits

Author SHA1 Message Date
c851a26beb Add analytics endpoint, price history API, and fix daysAvailable calculation
- Fix daysAvailable to detect gaps >25 days (indicates unit was re-listed)
- Add /unit/:unitCode/price-history endpoint for full price history
- Add /analytics endpoint with monthly trends, seasonality analysis,
  plan performance, historical comparisons, and price per sqft stats
- Add /last-scrape endpoint to return timestamp of most recent data
- Increase priceHistory limit from 5 to 30 for better chart data
2026-01-21 10:10:39 -07:00
e9b4528dc5 Fix network and /api endpoint 2025-07-16 10:42:14 -06:00

View File

@ -302,7 +302,6 @@ app.get('/available-units', async (req, res) => {
area: "$area",
community: "$community",
available: "$available",
soonest: "$soonest",
currentPrice: "$currentPrice.price",
minPrice: "$priceStats.minPrice",
maxPrice: "$priceStats.maxPrice",