From dfa793c83b923b5c2af9e0916568352411ef5c9e Mon Sep 17 00:00:00 2001 From: blaz-cerpnjak Date: Thu, 28 Mar 2024 09:50:40 +0100 Subject: [PATCH] Fix getting user by id --- API_GatewayWeb/Logic/User.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API_GatewayWeb/Logic/User.go b/API_GatewayWeb/Logic/User.go index 87b941c..25c3cec 100644 --- a/API_GatewayWeb/Logic/User.go +++ b/API_GatewayWeb/Logic/User.go @@ -36,7 +36,7 @@ func (c *Controller) GetAllUsers(ctx context.Context) (users []DataStructures.Us } func (c *Controller) GetUserById(ctx context.Context, id primitive.ObjectID) (user DataStructures.User, err error) { - url := fmt.Sprintf("%s/users/%s", getEnv("USERS_API", "http://localhost:8081/api/v1"), user.Id.Hex()) + url := fmt.Sprintf("%s/users/%s", getEnv("USERS_API", "http://localhost:8081/api/v1"), id.Hex()) request, err := http.NewRequest("GET", url, nil) if err != nil {