diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-14 19:53:31 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-14 19:53:31 +0100 |
| commit | 3a42fe7ad797a6f9cf747d2d358015ac992765a7 (patch) | |
| tree | 169c2123067abc677b9e3fa8d19142bd3af3338e /public/assets/js/lib/sdk | |
| parent | d776e6aa7d1e458ef050c016a4c285aa5887c5f0 (diff) | |
change password - profile stuff
Diffstat (limited to 'public/assets/js/lib/sdk')
| -rw-r--r-- | public/assets/js/lib/sdk/auth.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/public/assets/js/lib/sdk/auth.js b/public/assets/js/lib/sdk/auth.js index c720292..0b49449 100644 --- a/public/assets/js/lib/sdk/auth.js +++ b/public/assets/js/lib/sdk/auth.js @@ -70,6 +70,7 @@ var auth = (function(){ $.ajax({ method: 'put', url: '/api/checkin', + headers: { "csrf-token": $("[name=_csrf]").attr("value") }, success: function(data){ if (data && data.user && data.user.id !== -1) { auth.set_user(data.user) @@ -77,7 +78,11 @@ var auth = (function(){ return } opt.error() - } + }, + error: function(){ + window.location.href = '/login' + opt.error() + }, }) } |
