From: Adam Dullage Date: Tue, 7 May 2024 20:02:33 +0000 (+0100) Subject: Remove commented code in api.js X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=e4546315544a3950ad91aa47306c9ad16c9078a7;p=flatnotes.git Remove commented code in api.js --- diff --git a/client/api.js b/client/api.js index a6a6707..05fcee6 100644 --- a/client/api.js +++ b/client/api.js @@ -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;