Skip to content

Commit

Permalink
fix issue where a path to the openproject instance is overwritten (#3)
Browse files Browse the repository at this point in the history
The previous implementation add "/api/v3" to the host URL and overwrites the path to the instance. So, if the URL of the instance is:

https://host.de/openproject

the request will go to

https://host.de/api/v3

instead of

https://host.de/openproject/api/v3

This commit fixes that by appending the path instead.
  • Loading branch information
mkluge committed Jul 18, 2023
1 parent 345da6e commit 3de25b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/requests/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func Do(method string, path string, query *Query, requestData *RequestData) (res
}

requestUrl := *host
requestUrl.Path = path
requestUrl.Path += path
if query != nil {
requestUrl.RawQuery = query.String()
}
Expand Down

0 comments on commit 3de25b0

Please sign in to comment.