rollback axios not redirecting on 401 errors for certain urls
This commit is contained in:
		@@ -62,16 +62,8 @@ export default function ({ app, router }) {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
      // unauthorized
 | 
					      // unauthorized
 | 
				
			||||||
      else if (error.response.status === 401) {
 | 
					      else if (error.response.status === 401) {
 | 
				
			||||||
        // bypass redirect for auth check endpoint
 | 
					 | 
				
			||||||
        if (
 | 
					 | 
				
			||||||
          error.config.url !== "_allauth/browser/v1/auth/session" ||
 | 
					 | 
				
			||||||
          error.config.url !== "ws/dashinfo" // TODO once auth is working, need to extend it to websockets
 | 
					 | 
				
			||||||
        ) {
 | 
					 | 
				
			||||||
          return Promise.reject({ ...error });
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
        router.push({ path: "/expired" });
 | 
					        router.push({ path: "/expired" });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      // perms
 | 
					      // perms
 | 
				
			||||||
      else if (error.response.status === 403) {
 | 
					      else if (error.response.status === 403) {
 | 
				
			||||||
        // don't notify user if method is GET
 | 
					        // don't notify user if method is GET
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user