fix report API
This commit is contained in:
parent
e60cec7ee6
commit
3b1c9adb6d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user