fix report API
This commit is contained in:
parent
e60cec7ee6
commit
3b1c9adb6d
|
@ -19,11 +19,11 @@ func GetReports() ([]*Report, error) {
|
|||
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.Set("account_id", string(accountID))
|
||||
for _, id := range ids {
|
||||
params.Add("status_ids[]", string(id))
|
||||
params.Set("account_id", a.GetID())
|
||||
for _, status := range statuses {
|
||||
params.Add("status_ids[]", status.GetID())
|
||||
}
|
||||
params.Set("comment", comment)
|
||||
var report Report
|
||||
|
|
Loading…
Reference in New Issue
Block a user