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

fix: editor save after token renewal #11068

Merged
merged 1 commit into from
Jun 19, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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