mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-24 16:41:35 -04:00
Merge pull request #7876 from owncloud/return200OnCreateLink
return 200 and not 201 when creating sharing link
This commit is contained in:
@@ -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})
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user