Merge pull request #11256 from kobergj/AllowSettingIDs

Allow setting spaceIDs through graph API
This commit is contained in:
kobergj authored and GitHub committed 2025-04-23 14:53:16 +02:00
commit 6e1ac5a20b
2 files changed
+9

No files matched your search

@@ -0,0 +1,5 @@
Enhancement: Allow setting driveid through graph API
Allow setting the id through the graph API. This should always be a uuid to avoid clashes, but this is the responsibility of the API user.
https://github.com/owncloud/ocis/pull/11256
+4
View File
@@ -384,6 +384,10 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) {
Quota: getQuota(drive.Quota, g.config.Spaces.DefaultQuota),
}
if drive.Id != nil {
csr.Opaque = utils.AppendPlainToOpaque(csr.Opaque, "spaceid", *drive.Id)
}
if drive.Description != nil {
csr.Opaque = utils.AppendPlainToOpaque(csr.Opaque, "description", *drive.Description)
}