From d7cba443c00c971e0927eca035824c6cfbe1d364 Mon Sep 17 00:00:00 2001
From: Abdulsamad Sheikh <abdulsas@stud.ntnu.no>
Date: Thu, 7 Mar 2024 05:29:33 +0000
Subject: [PATCH] Edited FetchCountriesByLanguage to expect an array of
 CountryInfo objects instead of a single LanguageCountriesResponse object

---
 models/models.go | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/models/models.go b/models/models.go
index a90be57..c1b4077 100644
--- a/models/models.go
+++ b/models/models.go
@@ -37,8 +37,12 @@ type LanguageCountriesResponse struct {
 
 // CountryInfo represents country information in the LanguageCountriesResponse.
 type CountryInfo struct {
-    Name    string `json:"name"`
-    ISOCode string `json:"isoCode"`
+    ISO3166_1_Alpha_3 string `json:"ISO3166_1_Alpha_3"`
+    ISO3166_1_Alpha_2 string `json:"ISO3166_1_Alpha_2"`
+    Official_Name     string `json:"Official_Name"`
+    Region_Name       string `json:"Region_Name"`
+    Sub_Region_Name   string `json:"Sub_Region_Name"`
+    Language          string `json:"Language"`
 }
 
 // CountryResponse represents the structure of a country response from the REST Countries API.
@@ -62,4 +66,4 @@ type ServiceStatus struct {
     CountriesAPI string `json:"countriesapi"`
     Version      string `json:"version"`
     Uptime       int64  `json:"uptime"`
-}
\ No newline at end of file
+}
-- 
GitLab