Skip to content

Commit

Permalink
Security / Improvements
Browse files Browse the repository at this point in the history
- host has been changed to localhost since heroku is no longer working
- some dependencies has been updated to fix security vulnerabilities
- go version has been updated in the docker-compose file
- some errors were fixed in the swagger documentation on albums_controller.go
  • Loading branch information
cyruzin committed Dec 26, 2023
1 parent c2d3715 commit 2ea44fd
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18.3-alpine as build
FROM golang:1.21.5-alpine3.19 as build

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions app/http/controllers/albums_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type albumRequest struct {
// @Accept json
// @Produce json
// @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>)
// @Success 200 {object} []domain.Album
// @Success 200 {object} []*domain.Albums
// @Failure 500 {object} rest.Message
// @Router /album [get]
func (a *AlbumsController) FindAll(w http.ResponseWriter, r *http.Request) {
Expand All @@ -52,7 +52,7 @@ func (a *AlbumsController) FindAll(w http.ResponseWriter, r *http.Request) {
// @Produce json
// @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>)
// @Param uuid path string true "album uuid"
// @Success 200 {object} domain.Album
// @Success 200 {object} *domain.Albums
// @Failure 404 {object} rest.Message
// @Failure 500 {object} rest.Message
// @Router /album/{uuid} [get]
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
// @license.name MIT
// @license.url https://github.com/cyruzin/hexagony/blob/master/LICENSE

// @host hexagony.herokuapp.com
// @host http://localhost:8000
func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
Expand Down
2 changes: 1 addition & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ const docTemplate = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "hexagony.herokuapp.com",
Host: "http://localhost:8000",
BasePath: "",
Schemes: []string{},
Title: "Hexagony API",
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"version": "1.0"
},
"host": "hexagony.herokuapp.com",
"host": "http://localhost:8000",
"paths": {
"/album": {
"get": {
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ definitions:
status:
type: integer
type: object
host: hexagony.herokuapp.com
host: http://localhost:8000
info:
contact:
email: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module hexagony

go 1.19
go 1.21

require (
github.com/DATA-DOG/go-sqlmock v1.5.1
Expand Down

0 comments on commit 2ea44fd

Please sign in to comment.