From 55e33f4256996eb690545faedecb7d76b14628d6 Mon Sep 17 00:00:00 2001
From: Torgrim <sir_alexiner@hotmail.com>
Date: Sun, 21 Apr 2024 14:51:41 +0200
Subject: [PATCH] Testing Automatic Deployment trough CI/CD

---
 .gitlab-ci.yml                                            | 2 +-
 Go/docker-compose.yml                                     | 6 +++---
 Go/internal/handlers/empty_handler.go                     | 6 +++++-
 Go/internal/handlers/endpoint/util/user_delete_handler.go | 1 +
 Go/internal/utils/structs/structs.go                      | 8 ++++++++
 5 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d746c0c..1d11a0b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -51,6 +51,6 @@ Deploy:
   script:
     - docker compose up globeboard -d
   after_script:
-    - docker compose ps
+    - docker ps
   only:
     - main
\ No newline at end of file
diff --git a/Go/docker-compose.yml b/Go/docker-compose.yml
index 9c2ca66..f69c344 100644
--- a/Go/docker-compose.yml
+++ b/Go/docker-compose.yml
@@ -1,11 +1,11 @@
 services:
   globeboard:
-    image: go-globeboard
+    image: globeboard
     build:
       context: .
       dockerfile: Dockerfile
     ports:
-      - '${PORT}:0.0.0.0:${PORT}'
+      - '${PORT}:${PORT}'
     restart: unless-stopped
     environment:
       PORT: ${PORT}
@@ -17,7 +17,7 @@ services:
       - Firebase
 
   globeboard-test:
-    image: go-globeboard-test
+    image: globeboard-test
     build:
       context: .
       dockerfile: Dockerfile-test
diff --git a/Go/internal/handlers/empty_handler.go b/Go/internal/handlers/empty_handler.go
index f0a799a..240848f 100644
--- a/Go/internal/handlers/empty_handler.go
+++ b/Go/internal/handlers/empty_handler.go
@@ -12,7 +12,11 @@ const (
 	ISE = "Internal Server Error"
 )
 
-// EmptyHandler handles every request to the root path by redirecting to the endpoints.
+// EmptyHandler
+//
+//	@Description:
+//	@param w
+//	@param r
 func EmptyHandler(w http.ResponseWriter, r *http.Request) {
 	if r.URL.Path != "/" {
 		http.NotFound(w, r)
diff --git a/Go/internal/handlers/endpoint/util/user_delete_handler.go b/Go/internal/handlers/endpoint/util/user_delete_handler.go
index c146b68..a4f3769 100644
--- a/Go/internal/handlers/endpoint/util/user_delete_handler.go
+++ b/Go/internal/handlers/endpoint/util/user_delete_handler.go
@@ -34,4 +34,5 @@ func deleteUser(w http.ResponseWriter, r *http.Request) {
 	}
 
 	w.WriteHeader(http.StatusNoContent)
+	log.Print("Successfully Deleted User: ", ID)
 }
diff --git a/Go/internal/utils/structs/structs.go b/Go/internal/utils/structs/structs.go
index 0158c68..e0892b9 100644
--- a/Go/internal/utils/structs/structs.go
+++ b/Go/internal/utils/structs/structs.go
@@ -57,6 +57,8 @@ type FeaturesDashboard struct {
 	TargetCurrencies map[string]float64    `json:"targetCurrencies,omitempty"`
 }
 
+// CoordinatesDashboard
+// @Description:
 type CoordinatesDashboard struct {
 	Latitude  string `json:"latitude,omitempty"`
 	Longitude string `json:"longitude,omitempty"`
@@ -64,6 +66,8 @@ type CoordinatesDashboard struct {
 
 // Status structs
 
+// StatusResponse
+// @Description:
 type StatusResponse struct {
 	CountriesApi    string `json:"countries_api"`
 	MeteoApi        string `json:"meteo_api"`
@@ -105,6 +109,8 @@ type Footer struct {
 	Text string `json:"text"`
 }
 
+// Embed
+// @Description:
 type Embed struct {
 	Title       string  `json:"title"`
 	Author      Author  `json:"author"`
@@ -115,6 +121,8 @@ type Embed struct {
 	Footer      Footer  `json:"footer"`
 }
 
+// WebhookPayload
+// @Description:
 type WebhookPayload struct {
 	Username  string  `json:"username"`
 	AvatarURL string  `json:"avatar_url"`
-- 
GitLab