fix unrestricted quota
This commit is contained in:
2 files changed
+8
-4
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
Bugfix: Fix unrestricted quota on the graphAPI
|
||||||
|
|
||||||
|
Unrestricted quota needs to show 0 on the API. It is not good for clients when the property is missing.
|
||||||
|
|
||||||
|
https://github.com/owncloud/ocis/pull/4363
|
||||||
@@ -640,16 +640,15 @@ func (g Graph) getDriveQuota(ctx context.Context, space *storageprovider.Storage
|
|||||||
}
|
}
|
||||||
|
|
||||||
used := int64(res.UsedBytes)
|
used := int64(res.UsedBytes)
|
||||||
|
total := int64(res.TotalBytes)
|
||||||
qta := libregraph.Quota{
|
qta := libregraph.Quota{
|
||||||
Remaining: &remaining,
|
Remaining: &remaining,
|
||||||
Used: &used,
|
Used: &used,
|
||||||
|
Total: &total,
|
||||||
}
|
}
|
||||||
|
|
||||||
var t int64
|
var t int64
|
||||||
if total := int64(res.TotalBytes); total != 0 {
|
if total != 0 {
|
||||||
|
|
||||||
// A quota was set
|
|
||||||
qta.Total = &total
|
|
||||||
t = total
|
t = total
|
||||||
} else {
|
} else {
|
||||||
// Quota was not set
|
// Quota was not set
|
||||||
|
|||||||
Reference in new issue
Block a user