Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abaldeweg authored Oct 23, 2024
1 parent 0692b77 commit 4ee59e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gateway/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func response(req *http.Request, c *gin.Context) error {
if err == context.DeadlineExceeded {
c.JSON(http.StatusGatewayTimeout, gin.H{"error": "Request timed out"})
} else {
c.JSON(http.StatusBadGateway, gin.H{"msg": "Bad Gateway"})
c.JSON(http.StatusBadGateway, gin.H{"msg": err.Error()})
}
return err
}
Expand Down
6 changes: 3 additions & 3 deletions gateway/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ func Routes() *gin.Engine {
apiCoreInventory.DELETE(`/:id`, handleCoreAPIWithId("/apis/core/1/api/inventory"))
}

apiCore.GET(`/api/me`, handleCoreAPI("apis/core/1/api/me"))
apiCore.POST(`/api/login_check`, handleCoreAPI("apis/core/1/api/login_check"))
apiCore.PUT(`/api/password`, handleCoreAPI("apis/core/1/api/password"))
apiCore.GET(`/api/me`, handleCoreAPI("/apis/core/1/api/me"))
apiCore.POST(`/api/login_check`, handleCoreAPI("/apis/core/1/api/login_check"))
apiCore.PUT(`/api/password`, handleCoreAPI("/apis/core/1/api/password"))

apiCorePublic := apiCore.Group(`/api/public`)
{
Expand Down

0 comments on commit 4ee59e3

Please sign in to comment.