return 200 and not 201 when creating sharing link

This commit is contained in:
Artur Neumann
2023-12-04 17:41:05 +05:45
parent 23e59b5ded
commit 3f476680a3
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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})
}
+2 -2
View File
@@ -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)