Skip to content

Commit 1792f58

Browse files
committed
fix: response struct for PUT /2/lists/:id #284
1 parent 5f4f414 commit 1792f58

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

list/managelist/types/response.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ func (r *CreateOutput) HasPartialError() bool {
1212
}
1313

1414
type UpdateOutput struct {
15-
Updated bool `json:"updated"`
15+
Data struct {
16+
Updated bool `json:"updated"`
17+
} `json:"data"`
1618
}
1719

1820
func (r *UpdateOutput) HasPartialError() bool {

list/managelist/types/response_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ func Test_UpdateOutput_HasPartialError(t *testing.T) {
2121
{
2222
name: "has data",
2323
res: &types.UpdateOutput{
24-
Updated: false,
24+
Data: struct {
25+
Updated bool "json:\"updated\""
26+
}{
27+
Updated: false,
28+
},
2529
},
2630
expect: false,
2731
},

0 commit comments

Comments
 (0)