diff --git a/auth_required.js b/auth_required.js index 7b693a3..690c15d 100644 --- a/auth_required.js +++ b/auth_required.js @@ -1,3 +1,4 @@ -/*** - * @todo Redirect the user to login page if token is not present. - */ \ No newline at end of file +if(localStorage.getItem('token')==null) +{ + window.location.href='/login/'; +} \ No newline at end of file diff --git a/index.html b/index.html index a3bde5b..7028797 100644 --- a/index.html +++ b/index.html @@ -40,7 +40,7 @@