Create space with description (#3168)

* send description during create space

* add changelog

* update reva

* add to API test

* only use opaque if not nil

* use forked xattr to fix windows build

Signed-off-by: Michael Barz <mbarz@owncloud.com>
This commit is contained in:
Michael Barz
2022-02-15 14:18:27 +01:00
committed by GitHub
parent c2c7478bf4
commit af0a5fac18
6 changed files with 60 additions and 24 deletions
+2 -8
View File
@@ -17,6 +17,7 @@ import (
storageprovider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
ctxpkg "github.com/cs3org/reva/pkg/ctx"
"github.com/cs3org/reva/pkg/utils"
"github.com/go-chi/chi/v5"
"github.com/go-chi/render"
libregraph "github.com/owncloud/libre-graph-api-go"
@@ -192,14 +193,7 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) {
}
if drive.Description != nil {
csr.Opaque = &types.Opaque{
Map: map[string]*types.OpaqueEntry{
"description": {
Decoder: "plain",
Value: []byte(*drive.Description),
},
},
}
csr.Opaque = utils.AppendPlainToOpaque(csr.Opaque, "description", *drive.Description)
}
resp, err := client.CreateStorageSpace(r.Context(), &csr)