diff --git a/services/graph/pkg/service/v0/links.go b/services/graph/pkg/service/v0/links.go index 5efb1bdfe8..0bfd6aac15 100644 --- a/services/graph/pkg/service/v0/links.go +++ b/services/graph/pkg/service/v0/links.go @@ -51,7 +51,7 @@ func (g Graph) CreateLink(w http.ResponseWriter, r *http.Request) { return } - render.Status(r, http.StatusCreated) + render.Status(r, http.StatusOK) render.JSON(w, r, []libregraph.Permission{*perm}) } diff --git a/services/graph/pkg/service/v0/links_test.go b/services/graph/pkg/service/v0/links_test.go index d42c788081..8376e7b58b 100644 --- a/services/graph/pkg/service/v0/links_test.go +++ b/services/graph/pkg/service/v0/links_test.go @@ -163,7 +163,7 @@ var _ = Describe("createLinkTests", func() { WithContext(ctx), ) - Expect(rr.Code).To(Equal(http.StatusCreated)) + Expect(rr.Code).To(Equal(http.StatusOK)) var createLinkResponseBody []*libregraph.Permission err := json.Unmarshal(rr.Body.Bytes(), &createLinkResponseBody) @@ -355,7 +355,7 @@ var _ = Describe("createLinkTests", func() { WithContext(ctx), ) - Expect(rr.Code).To(Equal(http.StatusCreated)) + Expect(rr.Code).To(Equal(http.StatusOK)) var createLinkResponseBody []*libregraph.Permission err = json.Unmarshal(rr.Body.Bytes(), &createLinkResponseBody)