From 545fdf16d84115fdeef5c70db3fe140d1431de08 Mon Sep 17 00:00:00 2001 From: Aditya-Kerkar Date: Thu, 12 Sep 2024 20:22:04 +0530 Subject: [PATCH 1/2] "Unauthorized" modal removed --- lib/web/src/actions/userActions.js | 2 +- package.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/web/src/actions/userActions.js b/lib/web/src/actions/userActions.js index f1bf291..15c781a 100644 --- a/lib/web/src/actions/userActions.js +++ b/lib/web/src/actions/userActions.js @@ -80,7 +80,7 @@ export function getUserProfile (callback) { }) .catch((error) => { if (error.response) { - if (error.response.status === 403) { + if (error.response.status === 401) { window.localStorage.removeItem('errsole-jwt-token'); const { protocol, hostname, port, pathname } = window.location; const path = `${protocol}//${hostname}${port ? ':' + port : ''}${pathname}`; diff --git a/package.json b/package.json index 907bb32..74acdcf 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "main": "lib/errsole.js", "types": "types/errsole.d.ts", "scripts": { - "build:web": "NODE_OPTIONS=--openssl-legacy-provider webpack --config lib/web/webpack/website.config.js", + "build:web": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --config lib/web/webpack/website.config.js", "setup": "npm install && npm install errsole-sequelize sqlite3 --no-save && npm run build:web", "dev": "node examples/index.js", "test": "jest --coverage", @@ -35,6 +35,8 @@ }, "dependencies": { "@hapi/h2o2": "^10.0.4", + "ajv": "^8.17.1", + "ajv-keywords": "^5.1.0", "axios": "^1.6.8", "body-parser": "^1.20.2", "express": "^4.17.1", @@ -61,6 +63,7 @@ "babel-preset-react": "^6.24.1", "compression-webpack-plugin": "^11.1.0", "coveralls": "^3.1.1", + "cross-env": "^7.0.3", "css-loader": "^6.10.0", "history": "^4.10.1", "jest": "^29.7.0", From 2b8cc15714d31e303d11103bb1f350d31b92875e Mon Sep 17 00:00:00 2001 From: Aditya-Kerkar Date: Thu, 12 Sep 2024 20:27:00 +0530 Subject: [PATCH 2/2] update --- package.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index 74acdcf..907bb32 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "main": "lib/errsole.js", "types": "types/errsole.d.ts", "scripts": { - "build:web": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --config lib/web/webpack/website.config.js", + "build:web": "NODE_OPTIONS=--openssl-legacy-provider webpack --config lib/web/webpack/website.config.js", "setup": "npm install && npm install errsole-sequelize sqlite3 --no-save && npm run build:web", "dev": "node examples/index.js", "test": "jest --coverage", @@ -35,8 +35,6 @@ }, "dependencies": { "@hapi/h2o2": "^10.0.4", - "ajv": "^8.17.1", - "ajv-keywords": "^5.1.0", "axios": "^1.6.8", "body-parser": "^1.20.2", "express": "^4.17.1", @@ -63,7 +61,6 @@ "babel-preset-react": "^6.24.1", "compression-webpack-plugin": "^11.1.0", "coveralls": "^3.1.1", - "cross-env": "^7.0.3", "css-loader": "^6.10.0", "history": "^4.10.1", "jest": "^29.7.0",