diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d746c0ce4ab39f88a8ee97c20b6460053bdc2a0b..1d11a0b0e50a8b5f87b4b40d6584fac89f2b93f8 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 9c2ca6689b88a2c989cd91be3a1532ee5bb0dabd..f69c344148a291061b20779c9f96f7d48d3b1a5c 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 f0a799a246a8c2246c9e989cfc462e3c2d9f9471..240848f2e893cdad43153c6acdeb6f89150e23ea 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 c146b688cb779ebc6edd283536d8cbb06fe567f8..a4f3769c13bf6ccbab2829083c71dbbbcccab32b 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 0158c68e70026829b208af40cc2816774c40fbfe..e0892b96b3b1e4c71fd442ed7cc078f45f1cbd19 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"`