Skip to content

Commit

Permalink
Merge pull request #61 from Xenomorph07/master
Browse files Browse the repository at this point in the history
2
  • Loading branch information
RustyDev69 authored Jul 30, 2024
2 parents b3c86cf + 0dc4584 commit 4811c58
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
include .env
DOCKER_COMPOSE = docker compose

DB_URI = "host=localhost port=${POSTGRES_PORT} user=${POSTGRES_USER} password=${POSTGRES_PASSWORD} dbname=${POSTGRES_DB} sslmode=disable"
DB_URI = "host=localhost port=6500 user=${POSTGRES_USER} password=${POSTGRES_PASSWORD} dbname=${POSTGRES_DB} sslmode=disable"

# Targets
.PHONY: build up down logs restart clean migrate-up migrate-down
Expand All @@ -26,10 +26,10 @@ clean:
$(DOCKER_COMPOSE) down -v

migrate-up:
cd db/migrations && goose postgres $(URI) up && cd ../..
cd db/migrations && goose postgres $(DB_URI) up && cd ../..

migrate-down:
cd db/migrations && goose postgres $(URI) down && cd ../..
cd db/migrations && goose postgres $(DB_URI) down && cd ../..

# Help target
help:
Expand Down
1 change: 1 addition & 0 deletions internal/middleware/check_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func AuthUser(next echo.HandlerFunc) echo.HandlerFunc {
"status": "fail",
})
}

claims, ok := token.Claims.(jwt.MapClaims)
if !ok {
return c.JSON(http.StatusUnauthorized, map[string]interface{}{
Expand Down
2 changes: 1 addition & 1 deletion nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ server {
gzip_proxied any;
gzip_types text/plain text/css application/json application/javascript; # Access log for debugging access_log /var/log/nginx/access.log;
# Serve static files from the application directory
location /api {
location / {

# CORS
if ($request_method = 'OPTIONS') {
Expand Down

0 comments on commit 4811c58

Please sign in to comment.