Commit c4d4a8c
authored
Fix bug with incorrect request payload for groups (Branch Restrictions) (#172)
The API expects the group slug to be passed in, without this, API returns a HTTP 400 error. Also, fixed `branchRestrictionsBodyGroup` struct, specifically the inner `links` struct which accidentally included `full_slug` & `slug` - both of which should be at the root level.
Previously a request with this payload
```
{"kind":"push","pattern":"develop","links":{"self":{"href":""}},"value":null,"id":0,"users":null,"groups":[{"name":"za-test"}]}
```
Would return
```
{"type":"error","error":{"message":"malformed groups"}}
```
With the fixed payload, we now get a success response.
```
{"kind":"push","pattern":"develop","links":{"self":{"href":""}},"value":null,"id":0,"users":null,"groups":[{"slug":"za-test"}]}
```1 parent 3feff68 commit c4d4a8c
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 85 | | |
| 86 | + | |
| 87 | + | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
| |||
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
131 | | - | |
| 130 | + | |
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
| |||
0 commit comments