From a7f1d8e67230a0c5710e070717512fe59df79634 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Fri, 21 May 2021 16:02:15 +0200 Subject: [PATCH] fix response format After accepting or declining a share the response needs to enclose the updated share in an array. --- changelog/unreleased/update-share-response.md | 1 + .../owncloud/ocs/handlers/apps/sharing/shares/pending.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/unreleased/update-share-response.md b/changelog/unreleased/update-share-response.md index b7645c3c3d..deae2d579a 100644 --- a/changelog/unreleased/update-share-response.md +++ b/changelog/unreleased/update-share-response.md @@ -3,3 +3,4 @@ Enhancement: Add share to update response After accepting or rejecting a share the API includes the updated share in the response. https://github.com/cs3org/reva/pull/1685 +https://github.com/cs3org/reva/pull/1724 diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go index 4a7d06684a..33636f3227 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go @@ -105,5 +105,5 @@ func (h *Handler) updateReceivedShare(w http.ResponseWriter, r *http.Request, sh data.Path = path.Join(h.sharePrefix, path.Base(info.Path)) } - response.WriteOCSSuccess(w, r, data) + response.WriteOCSSuccess(w, r, []*conversions.ShareData{data}) }