* Correlations: add UpdateCorrelation HTTP API
* handle correlation not found
* add tests
* fix lint errors
* add bad request to API spec
* change casing
* fix casing in docs
* fix tests
* update spec
(cherry picked from commit 09c4dbdb9f)
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
This commit is contained in:
co-authored by
Giordano Ricci
parent
6fe808734b
commit
83e062f4c8
@@ -64,6 +64,25 @@ func (c TestContext) Post(params PostParams) *http.Response {
|
||||
return resp
|
||||
}
|
||||
|
||||
type PatchParams struct {
|
||||
url string
|
||||
body string
|
||||
user User
|
||||
}
|
||||
|
||||
func (c TestContext) Patch(params PatchParams) *http.Response {
|
||||
c.t.Helper()
|
||||
|
||||
req, err := http.NewRequest(http.MethodPatch, c.getURL(params.url, params.user), bytes.NewBuffer([]byte(params.body)))
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
require.NoError(c.t, err)
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
require.NoError(c.t, err)
|
||||
require.NoError(c.t, err)
|
||||
|
||||
return resp
|
||||
}
|
||||
|
||||
type DeleteParams struct {
|
||||
url string
|
||||
user User
|
||||
|
||||
Reference in New Issue
Block a user