Skip to content

Commit

Permalink
removing api interceptors
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzikas committed Jul 7, 2021
1 parent 11b9bdc commit 7560351
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions frontend/src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,17 @@ const actions = {

}

API.interceptors.response.use(
(response) => response,
(error) => {
console.error(error?.response?.data)
NotificationManager.error(String(error?.response?.data?.message || error?.response?.data?.msg))
if (error?.response?.status == 403 || error?.response?.status == 401) {
localStorage.removeItem("token")
localStorage.removeItem("googletoken")
}
// API.interceptors.response.use(
// (response) => response,
// (error) => {
// console.error(error?.response?.data)
// NotificationManager.error(String(error?.response?.data?.message || error?.response?.data?.msg))
// if (error?.response?.status == 403 || error?.response?.status == 401) {
// localStorage.removeItem("token")
// localStorage.removeItem("googletoken")
// }

}
)
// }
// )

export default actions
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function createJitsiMeetWindow() {
// }, 10000)

//Lets see
//mainWindow.webContents.openDevTools() //This don't seem to do nothing
//mainWindow.webContents.openDevTools()

//NOTIFIICATIONS
mainWindow.webContents
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CowBellClub",
"version": "1.7.4",
"version": "1.7.5",
"description": "Electron application for Cowbell Club",
"main": "./build/main.js",
"productName": "CowbellClub",
Expand Down

0 comments on commit 7560351

Please sign in to comment.