Fixed delete method in client.go, previously only the last record was removed.

This commit is contained in:
Nickolay Riumin
2021-02-24 14:28:38 +03:00
parent 8a338cef42
commit 31b370508b

View File

@@ -93,7 +93,7 @@ func (at *Client) delete(db, table string, recordIDs []string, target interface{
rawURL := fmt.Sprintf("%s/%s/%s", at.baseURL, db, table) rawURL := fmt.Sprintf("%s/%s/%s", at.baseURL, db, table)
params := url.Values{} params := url.Values{}
for _, recordID := range recordIDs { for _, recordID := range recordIDs {
params.Set("records[]", recordID) params.Add("records[]", recordID)
} }
req, err := http.NewRequest("DELETE", rawURL, nil) req, err := http.NewRequest("DELETE", rawURL, nil)
if err != nil { if err != nil {