Skip to content

Commit

Permalink
Merge pull request #11068 from owncloud/fix/editor-save-after-token-r…
Browse files Browse the repository at this point in the history
…enewal

fix: editor save after token renewal
  • Loading branch information
JammingBen authored Jun 19, 2024
2 parents 3eefbd8 + bb57361 commit b4f4dba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-editor-save-after-token-renewal
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Editor save after token renewal

We've fixed a bug where saving changes in an editor would not work after the access token has been renewed.

https://github.com/owncloud/web/pull/11068
https://github.com/owncloud/web/issues/11062
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export interface AppFileHandlingResult {
}

export function useAppFileHandling({
clientService: { webdav }
clientService
}: AppFileHandlingOptions): AppFileHandlingResult {
const clientService = useClientService()
clientService = clientService || useClientService()
const capabilityStore = useCapabilityStore()
const userStore = useUserStore()

Expand All @@ -63,7 +63,7 @@ export function useAppFileHandling({
fileContext: MaybeRef<FileContext>,
options: { responseType?: 'arraybuffer' | 'blob' | 'text' } & Record<string, any>
) => {
return webdav.getFileContents(
return clientService.webdav.getFileContents(
unref(unref(fileContext).space),
{
path: unref(unref(fileContext).item)
Expand All @@ -78,7 +78,7 @@ export function useAppFileHandling({
fileContext: MaybeRef<FileContext>,
options: ListFilesOptions = {}
): Promise<Resource> => {
return webdav.getFileInfo(
return clientService.webdav.getFileInfo(
unref(unref(fileContext).space),
{
path: unref(unref(fileContext).item),
Expand All @@ -92,7 +92,7 @@ export function useAppFileHandling({
fileContext: MaybeRef<FileContext>,
options: { content?: string } & Record<string, any>
) => {
return webdav.putFileContents(unref(unref(fileContext).space), {
return clientService.webdav.putFileContents(unref(unref(fileContext).space), {
path: unref(unref(fileContext).item),
...options
})
Expand Down

0 comments on commit b4f4dba

Please sign in to comment.