v1.5.0-delta
This commit is contained in:
@@ -18,7 +18,7 @@ type ListRequest struct {
|
||||
}
|
||||
|
||||
// List gets list user API task with status PROCESSING
|
||||
func (t Tasks) List(ctx context.Context, req ListRequest) (ListTasks, error) {
|
||||
func (t Tasks) List(ctx context.Context, req ListRequest) (*ListTasks, error) {
|
||||
url := "/cloudbroker/tasks/list"
|
||||
|
||||
res, err := t.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
@@ -33,5 +33,5 @@ func (t Tasks) List(ctx context.Context, req ListRequest) (ListTasks, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return item, nil
|
||||
return &item, nil
|
||||
}
|
||||
|
||||
@@ -45,6 +45,13 @@ func (r *InfoResult) UnmarshalJSON(b []byte) error {
|
||||
|
||||
// Detailed information about task
|
||||
type RecordTask struct {
|
||||
// Updated by
|
||||
UpdatedBy string `json:"updatedBy"`
|
||||
|
||||
ItemTask
|
||||
}
|
||||
|
||||
type ItemTask struct {
|
||||
// Audit ID
|
||||
AuditID string `json:"auditId"`
|
||||
|
||||
@@ -74,4 +81,10 @@ type RecordTask struct {
|
||||
}
|
||||
|
||||
// List of tasks
|
||||
type ListTasks []RecordTask
|
||||
type ListTasks struct {
|
||||
// Data
|
||||
Data []ItemTask `json:"data"`
|
||||
|
||||
// Entry count
|
||||
EntryCount uint64 `json:"entryCount"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user