diff --git a/handlers/handlers.go b/handlers/handlers.go index 0596fdd08bdf5a4ae8b1fd2f8afc85263c1f7dbf..940fe1e6dc236d403f46b82bb410e44f81ec0f2b 100644 --- a/handlers/handlers.go +++ b/handlers/handlers.go @@ -69,7 +69,7 @@ func ReadershipHandler(w http.ResponseWriter, r *http.Request) { var readershipDetails []models.ReadershipDetail var totalReadership int64 = 0 for _, country := range countries { // Directly range over countries - population, err := services.FetchPopulationByCountryCode(country.ISOCode) + population, err := services.FetchPopulationByCountryCode(country.ISO3166_1_Alpha_2) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return