diff options
author | 2020-11-18 23:15:38 +0100 | |
---|---|---|
committer | 2020-11-18 23:15:38 +0100 | |
commit | 1870f3fdf43707a15fda0f609a021f516f45eb63 (patch) | |
tree | fbaf527a47cd89a171df18da4b41e8ce34668555 /client/src/admin/api/logout.js | |
parent | e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d (diff) | |
download | website_creator-1870f3fdf43707a15fda0f609a021f516f45eb63.tar.gz website_creator-1870f3fdf43707a15fda0f609a021f516f45eb63.tar.bz2 website_creator-1870f3fdf43707a15fda0f609a021f516f45eb63.zip |
finish auth routes, create cookie token, fix folder structure, add context to FE
Diffstat (limited to 'client/src/admin/api/logout.js')
-rw-r--r-- | client/src/admin/api/logout.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/admin/api/logout.js b/client/src/admin/api/logout.js new file mode 100644 index 0000000..b0a9841 --- /dev/null +++ b/client/src/admin/api/logout.js @@ -0,0 +1,7 @@ +export default () => ( + fetch('/api/user/logout', { + method: 'POST', + }) + .then(() => window.location.href = "/") + .catch(() => {}) +); |