diff --git a/services/graph/pkg/service/v0/driveitems.go b/services/graph/pkg/service/v0/driveitems.go index 7124c3995a..55b5081023 100644 --- a/services/graph/pkg/service/v0/driveitems.go +++ b/services/graph/pkg/service/v0/driveitems.go @@ -494,7 +494,7 @@ func (g Graph) Invite(w http.ResponseWriter, r *http.Request) { case hasErrors && hasSuccesses: render.Status(r, http.StatusMultiStatus) case hasSuccesses: - render.Status(r, http.StatusCreated) + render.Status(r, http.StatusOK) default: render.Status(r, http.StatusInternalServerError) } diff --git a/services/graph/pkg/service/v0/driveitems_test.go b/services/graph/pkg/service/v0/driveitems_test.go index a3ef19371f..e34e6f7845 100644 --- a/services/graph/pkg/service/v0/driveitems_test.go +++ b/services/graph/pkg/service/v0/driveitems_test.go @@ -322,7 +322,7 @@ var _ = Describe("Driveitems", func() { jsonData := gjson.Get(rr.Body.String(), "value") - Expect(rr.Code).To(Equal(http.StatusCreated)) + Expect(rr.Code).To(Equal(http.StatusOK)) Expect(jsonData.Get("#").Num).To(Equal(float64(2))) Expect(jsonData.Get("0.id").Str).To(Equal("123")) @@ -347,7 +347,7 @@ var _ = Describe("Driveitems", func() { jsonData := gjson.Get(rr.Body.String(), "value") - Expect(rr.Code).To(Equal(http.StatusCreated)) + Expect(rr.Code).To(Equal(http.StatusOK)) Expect(jsonData.Get(`0.@libre\.graph\.permissions\.actions`).Exists()).To(BeFalse()) Expect(jsonData.Get("0.roles.#").Num).To(Equal(float64(1))) @@ -365,7 +365,7 @@ var _ = Describe("Driveitems", func() { jsonData := gjson.Get(rr.Body.String(), "value") - Expect(rr.Code).To(Equal(http.StatusCreated)) + Expect(rr.Code).To(Equal(http.StatusOK)) Expect(jsonData.Get("0.roles").Exists()).To(BeFalse()) Expect(jsonData.Get(`0.@libre\.graph\.permissions\.actions.#`).Num).To(Equal(float64(1)))