fix report API

This commit is contained in:
gutmet 2022-11-21 09:29:27 +01:00
parent e60cec7ee6
commit 3b1c9adb6d

View File

@ -19,11 +19,11 @@ func GetReports() ([]*Report, error) {
return reports, nil return reports, nil
} }
func ReportAccount(accountID ID, ids []ID, comment string) (*Report, error) { func (a *Account) Report(statuses []*Status, comment string) (*Report, error) {
params := url.Values{} params := url.Values{}
params.Set("account_id", string(accountID)) params.Set("account_id", a.GetID())
for _, id := range ids { for _, status := range statuses {
params.Add("status_ids[]", string(id)) params.Add("status_ids[]", status.GetID())
} }
params.Set("comment", comment) params.Set("comment", comment)
var report Report var report Report