diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-06-30 09:57:40 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-07-05 16:20:33 +0200 |
commit | 18f88a7042087f4ea93d66290ee6196b19a5db78 (patch) | |
tree | c1126000dcad7eb4163950618575078d4ef34f8c /apps/files/src/services | |
parent | 28c2d9e9063b05ad6eff9a227764a9571db4fcbe (diff) | |
download | nextcloud-server-18f88a7042087f4ea93d66290ee6196b19a5db78.tar.gz nextcloud-server-18f88a7042087f4ea93d66290ee6196b19a5db78.zip |
chore: update webdav to 5.2.2
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src/services')
-rw-r--r-- | apps/files/src/services/WebdavClient.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/files/src/services/WebdavClient.ts b/apps/files/src/services/WebdavClient.ts index 0630e695afa..ae2ab27b9db 100644 --- a/apps/files/src/services/WebdavClient.ts +++ b/apps/files/src/services/WebdavClient.ts @@ -19,10 +19,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -import { createClient, getPatcher, RequestOptions } from 'webdav' -import { request } from '../../../../node_modules/webdav/dist/node/request.js' +import type { RequestOptions, Response } from 'webdav' + +import { createClient, getPatcher } from 'webdav' import { generateRemoteUrl } from '@nextcloud/router' import { getCurrentUser, getRequestToken } from '@nextcloud/auth' +import { request } from 'webdav/dist/node/request.js' export const rootPath = `/files/${getCurrentUser()?.uid}` export const defaultRootUrl = generateRemoteUrl('dav' + rootPath) @@ -40,7 +42,10 @@ export const getClient = (rootUrl = defaultRootUrl) => { * @see https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/request.ts */ const patcher = getPatcher() - patcher.patch('request', (options: RequestOptions) => { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + // https://github.com/perry-mitchell/hot-patcher/issues/6 + patcher.patch('request', (options: RequestOptions): Promise<Response> => { if (options.headers?.method) { options.method = options.headers.method delete options.headers.method |