1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

Fixed vulnerabilities and remove unused or redundant dependencies (#55)

* chore: fix vulnerabilities and remove unused or redundant dependencies

* chore: Added start script and vulnerabilities screenshot

* fix: quick fix

* fix: converted to typescript + bugs removed

Co-authored-by: jahanzaibrao-dev <jahanzaib@tetrahex.com>
Co-authored-by: Saad Jutt <ihsan.distranger@gmail.com>
This commit is contained in:
JahanzaibRao15
2022-02-15 03:11:03 +05:00
committed by GitHub
parent 367b0f1f89
commit 58b6f439b3
10 changed files with 6521 additions and 28912 deletions

View File

@@ -8,11 +8,10 @@ const headers = {
Accept: 'application/json',
'Content-Type': 'application/json'
}
const { NODE_ENV, REACT_APP_PORT_API } = process.env
const NODE_ENV = process.env.NODE_ENV
const PORT_API = process.env.PORT_API
const baseUrl =
NODE_ENV === 'development'
? `http://localhost:${REACT_APP_PORT_API ?? 5000}`
: ''
NODE_ENV === 'development' ? `http://localhost:${PORT_API ?? 5000}` : ''
const getAuthCode = async (credentials: any) => {
return fetch(`${baseUrl}/SASjsApi/auth/authorize`, {
@@ -46,7 +45,7 @@ const Login = ({ setTokens, getCodeOnly }: any) => {
error = false
setErrorMessage('')
e.preventDefault()
let { REACT_APP_CLIENT_ID: clientId } = process.env
let clientId = process.env.CLIENT_ID
if (getCodeOnly) {
const params = new URLSearchParams(location.search)