Skip to content

Commit

Permalink
Fix getting user by id
Browse files Browse the repository at this point in the history
  • Loading branch information
blaz-cerpnjak committed Mar 28, 2024
1 parent 5aee5cb commit dfa793c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion API_GatewayWeb/Logic/User.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit dfa793c

Please sign in to comment.