Remove commented code in api.js
authorAdam Dullage <redacted>
Tue, 7 May 2024 20:02:33 +0000 (21:02 +0100)
committerAdam Dullage <redacted>
Tue, 7 May 2024 20:02:33 +0000 (21:02 +0100)
client/api.js

index a6a6707373dbebd228fc2d7eec70bce1c9965573..05fcee6c331af4ec62ea0b6b2cca6aab725c141d 100644 (file)
@@ -23,26 +23,6 @@ api.interceptors.request.use(
   },
 );
 
-// api.interceptors.response.use(
-//   function (response) {
-//     return response;
-//   },
-//   function (error) {
-//     // If the response is a 401 Unauthorized, redirect to the login page.
-//     if (
-//       error.response?.status === 401 &&
-//       router.currentRoute.value.name !== "login"
-//     ) {
-//       const redirectPath = router.currentRoute.value.fullPath;
-//       router.push({
-//         name: "login",
-//         query: { [constants.params.redirect]: redirectPath },
-//       });
-//     }
-//     return Promise.reject(error);
-//   },
-// );
-
 export function apiErrorHandler(error, toast) {
   if (error.response?.status === 401) {
     const redirectPath = router.currentRoute.value.fullPath;
git clone https://git.99rst.org/PROJECT