aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/modules/worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/modules/worker.js')
-rw-r--r--web_src/js/modules/worker.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/web_src/js/modules/worker.js b/web_src/js/modules/worker.js
new file mode 100644
index 0000000000..ef3f1dea48
--- /dev/null
+++ b/web_src/js/modules/worker.js
@@ -0,0 +1,9 @@
+import {sleep} from '../utils.js';
+
+const {appSubUrl} = window.config;
+
+export async function logoutFromWorker() {
+ // wait for a while because other requests (eg: logout) may be in the flight
+ await sleep(5000);
+ window.location.href = `${appSubUrl}/`;
+}