This commit is contained in:
2026-10-22 15:29:30 -07:00
parent 6c2379976d
commit 8c41e07d80
4 changed files with 13 additions and 11 deletions
+5 -5
View File
@@ -75,11 +75,11 @@ func main() {
go startPoller(database, weatherService, config.DefaultCity, 10*time.Minute)
// Register routes
http.HandleFunc("/weather/fetch", weatherHandler.FetchWeather)
http.HandleFunc("/weather/history", weatherHandler.GetHistory)
http.HandleFunc("/health", handlers.Health)
http.HandleFunc("/latest-temperature", handlers.LatestTemperature)
http.HandleFunc("/test", handlers.Test)
http.HandleFunc("/api/weather/fetch", weatherHandler.FetchWeather)
http.HandleFunc("/api/weather/history", weatherHandler.GetHistory)
http.HandleFunc("/api/health", handlers.Health)
http.HandleFunc("/api/latest-temperature", handlers.LatestTemperature)
http.HandleFunc("/api/test", handlers.Test)
// Start server
go func() {
fmt.Println("server listening on :8080")