Skip to content

Commit

Permalink
set query parameters for /find
Browse files Browse the repository at this point in the history
  • Loading branch information
artpar committed Jun 4, 2024
1 parent e1cab7a commit 6d6293b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion daptin_client_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ func (d daptinClientImpl) FindAll(tableName string, parameters DaptinQueryParame

var responseObject JsonApiObject

response, err := request.Get(d.endpoint + "/api/" + tableName)
url := d.endpoint + "/api/" + tableName + "?"
for key, parameter := range parameters {
url = url + key + "=" + fmt.Sprintf("%s", parameter) + "&"
}
response, err := request.Get(url)

if d.debug {
d.LogTraceInfo(err, response)
Expand Down

0 comments on commit 6d6293b

Please sign in to comment.