Browse Source

test 401 status

Avetisyan Karen 5 năm trước cách đây
mục cha
commit
2fd6a1c47b
2 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. BIN
      web_interface/dist/wui-3/role.js
  2. 3 0
      web_interface/src/wui-3/role.js

BIN
web_interface/dist/wui-3/role.js


+ 3 - 0
web_interface/src/wui-3/role.js

@@ -158,6 +158,9 @@ function loadXMLDoc(url, method, callback, body) {
         if (typeof callback == 'function') {
           callback.apply(xmlhttp);
         }
+      } else if (status == 401) {
+        alert('Request failed with status code 401');
+        window.location.reload();
       } else {
         console.log('Error');
       }