Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Not able to restore space in some constellations for some(space) admins #10424

Merged
merged 4 commits into from Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/bugfix-restore-space
@@ -0,0 +1,5 @@
Bugfix: Restore space

We've fixed a bug where restoring a space was not possible in some constellations for (space) admins.

https://github.com/owncloud/web/pull/10424
Expand Up @@ -28,15 +28,11 @@ export const useSpaceActionsRestore = ({ store }: { store?: Store<any> } = {}) =
const client = clientService.graphAuthenticated
const promises = spaces.map((space) =>
client.drives
.updateDrive(
space.id.toString(),
{ name: space.name },
{
headers: {
Restore: true
}
.updateDrive(space.id.toString(), {} as any, {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as any is not optimal but sending an empty object is not valid in the api spec, but the request goes trough

headers: {
Restore: true
}
)
})
.then((updatedSpace) => {
if (unref(route).name === 'admin-settings-spaces') {
space.disabled = false
Expand Down