mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-25 06:58:59 -06:00
include spaces etags in drives listing
This commit is contained in:
5
changelog/unreleased/spaces-etags.md
Normal file
5
changelog/unreleased/spaces-etags.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Enhancement: Include etags in drives listing
|
||||
|
||||
Added etags in the response of list drives.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3267
|
||||
2
go.mod
2
go.mod
@@ -22,7 +22,7 @@ require (
|
||||
github.com/blevesearch/bleve/v2 v2.3.1
|
||||
github.com/coreos/go-oidc/v3 v3.1.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19
|
||||
github.com/cs3org/reva/v2 v2.0.0
|
||||
github.com/cs3org/reva/v2 v2.0.0-20220304131900-b8be80d1ba81
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733
|
||||
github.com/go-chi/chi/v5 v5.0.7
|
||||
|
||||
4
go.sum
4
go.sum
@@ -342,8 +342,8 @@ github.com/crewjam/saml v0.4.5/go.mod h1:qCJQpUtZte9R1ZjUBcW8qtCNlinbO363ooNl02S
|
||||
github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19 h1:1jqPH58jCxvbaJ9WLIJ7W2/m622bWS6ChptzljSG6IQ=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
|
||||
github.com/cs3org/reva/v2 v2.0.0 h1:/w5jn77qm4p8Eizbiat3WDWZmY9mAM/le/lZ+Woa13Q=
|
||||
github.com/cs3org/reva/v2 v2.0.0/go.mod h1:XNtK1HEClNzmz5vyQa2DUw4KH3oqBjQoEsV1LhAGlV0=
|
||||
github.com/cs3org/reva/v2 v2.0.0-20220304131900-b8be80d1ba81 h1:g6c1HYGTSpDnf6uNPXYIOySVk0P545zWUPmdPWEcMps=
|
||||
github.com/cs3org/reva/v2 v2.0.0-20220304131900-b8be80d1ba81/go.mod h1:XNtK1HEClNzmz5vyQa2DUw4KH3oqBjQoEsV1LhAGlV0=
|
||||
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
|
||||
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
|
||||
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
|
||||
|
||||
@@ -507,15 +507,16 @@ func (g Graph) cs3StorageSpaceToDrive(baseURL *url.URL, space *storageprovider.S
|
||||
if description, ok := space.Opaque.Map["description"]; ok {
|
||||
drive.Description = libregraph.PtrString(string(description.Value))
|
||||
}
|
||||
}
|
||||
|
||||
if space.Opaque != nil && space.Opaque.Map != nil {
|
||||
v, ok := space.Opaque.Map["trashed"]
|
||||
if ok {
|
||||
if v, ok := space.Opaque.Map["trashed"]; ok {
|
||||
deleted := &libregraph.Deleted{}
|
||||
deleted.SetState(string(v.Value))
|
||||
drive.Root.Deleted = deleted
|
||||
}
|
||||
|
||||
if entry, ok := space.Opaque.Map["etag"]; ok {
|
||||
drive.Root.ETag = libregraph.PtrString(string(entry.Value))
|
||||
}
|
||||
}
|
||||
|
||||
if baseURL != nil {
|
||||
|
||||
Reference in New Issue
Block a user