Skip to content
Snippets Groups Projects
Commit 8a8ec234 authored by Abdulsamad Sheikh's avatar Abdulsamad Sheikh :cat2:
Browse files

Error with iso2

parent c3a505bd
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment