diff options
| author | Pitu <[email protected]> | 2017-01-18 02:40:14 -0300 |
|---|---|---|
| committer | Pitu <[email protected]> | 2017-01-18 02:40:14 -0300 |
| commit | 84ff2241ba81fc6a1a2201074d30f971dad8a0de (patch) | |
| tree | 8ec712f118fc7e553f170640e3c86760bbd2a2ec /public/js/upload.js | |
| parent | Better static routes (diff) | |
| download | host.fuwn.me-84ff2241ba81fc6a1a2201074d30f971dad8a0de.tar.xz host.fuwn.me-84ff2241ba81fc6a1a2201074d30f971dad8a0de.zip | |
Shit ton of things on this update
Diffstat (limited to 'public/js/upload.js')
| -rw-r--r-- | public/js/upload.js | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/public/js/upload.js b/public/js/upload.js index 3672077..0341ecc 100644 --- a/public/js/upload.js +++ b/public/js/upload.js @@ -37,11 +37,18 @@ upload.verifyToken = function(token, reloadOnError = false){ var json = JSON.parse(xhr.responseText); if(json.success === false){ - alert(json.description); - if(reloadOnError){ - localStorage.removeItem("token"); - location.reload(); - } + + swal({ + title: "An error ocurred", + text: json.description, + type: "error" + }, function(){ + if(reloadOnError){ + localStorage.removeItem("token"); + location.reload(); + } + }) + return; } |