diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-05-10 14:18:08 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-05-13 08:27:43 +0200 |
commit | c624c102a6edbe51256aaf5c0025ff6331018f32 (patch) | |
tree | 224082375cd3a6c433d6f3481e548e99ed8a47a6 /core/src/session-heartbeat.js | |
parent | 0b136d28a3ab9a14f1a001c0bc8ca15d4a4abf4a (diff) | |
download | nextcloud-server-c624c102a6edbe51256aaf5c0025ff6331018f32.tar.gz nextcloud-server-c624c102a6edbe51256aaf5c0025ff6331018f32.zip |
Move OC.requestToken to the bundle, deprecate oc_requesttoken
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/src/session-heartbeat.js')
-rw-r--r-- | core/src/session-heartbeat.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/src/session-heartbeat.js b/core/src/session-heartbeat.js index 5d1f7177cf7..9a4981e4bb7 100644 --- a/core/src/session-heartbeat.js +++ b/core/src/session-heartbeat.js @@ -23,6 +23,7 @@ import $ from 'jquery' import {generateUrl} from './OC/routing' import OC from './OC' +import {setToken as setRequestToken} from './OC/requesttoken' /** * session heartbeat (defaults to enabled) @@ -65,10 +66,7 @@ export const initSessionHeartBeat = () => { setInterval(() => { $.ajax(generateUrl('/csrftoken')) - .then(resp => { - oc_requesttoken = resp.token - OC.requestToken = resp.token - }) + .then(resp => setRequestToken(resp.token)) .fail(e => { console.error('session heartbeat failed', e) }) |