Skip to content

Commit

Permalink
Add quota from existing space while duplicating (#10139)
Browse files Browse the repository at this point in the history
* Add quota from existing space while duplicatin

* Enhance changelog item
  • Loading branch information
AlexAndBear committed Dec 13, 2023
1 parent 7133ce3 commit 2faf0d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changelog/unreleased/enhancement-duplicate-space
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ like tags or members.

https://github.com/owncloud/web/pull/10024
https://github.com/owncloud/web/pull/10132
https://github.com/owncloud/web/pull/10139
https://github.com/owncloud/web/issues/10016
https://github.com/owncloud/web/issues/10123
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export const useSpaceActionsDuplicate = ({
const { data: createdSpace } = await clientService.graphAuthenticated.drives.createDrive(
{
name: duplicatedSpaceName,
description: existingSpace.description
description: existingSpace.description,
quota: { total: existingSpace.spaceQuota.total }
},
{}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const spaces = [
description: 'To the moon',
type: 'project',
spaceImageData: null,
spaceReadmeData: null
spaceReadmeData: null,
spaceQuota: { total: Math.pow(10, 9) }
})
]
describe('restore', () => {
Expand Down Expand Up @@ -115,7 +116,10 @@ describe('restore', () => {
expect(clientService.graphAuthenticated.drives.createDrive).toHaveBeenCalledWith(
{
description: 'To the moon',
name: 'Moon (1)'
name: 'Moon (1)',
quota: {
total: Math.pow(10, 9)
}
},
expect.anything()
)
Expand Down

0 comments on commit 2faf0d2

Please sign in to comment.