diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-06-25 17:20:59 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-06-25 17:29:24 +0200 |
commit | 97501ef63577b72eaef6b1b5961b262c3529ec36 (patch) | |
tree | 76ddcf2d884c22a1cf359b0e9c0cb3ceb5589c2b /src/services | |
parent | 4758947a4b87aabc93b7b532a6afd815d514b0ce (diff) |
Use nextcloud-router more
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'src/services')
-rw-r--r-- | src/services/cdav.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/services/cdav.js b/src/services/cdav.js index 69a4aa53..1f6676c0 100644 --- a/src/services/cdav.js +++ b/src/services/cdav.js @@ -21,11 +21,13 @@ */ import DavClient from 'cdav-library' +import { generateRemoteUrl } from 'nextcloud-router' +import { getRequestToken } from 'nextcloud-auth' function xhrProvider() { var headers = { 'X-Requested-With': 'XMLHttpRequest', - 'requesttoken': OC.requestToken + 'requesttoken': getRequestToken() } var xhr = new XMLHttpRequest() var oldOpen = xhr.open @@ -43,5 +45,5 @@ function xhrProvider() { } export default new DavClient({ - rootUrl: OC.linkToRemote('dav') + rootUrl: generateRemoteUrl('dav') }, xhrProvider) |