fix: trim CW_BASIC_TOKEN and CW_CLIENT_ID to strip trailing whitespace/newlines
This commit is contained in:
@@ -74,8 +74,8 @@ export { io, engine };
|
|||||||
const connectWiseApi = axios.create({
|
const connectWiseApi = axios.create({
|
||||||
baseURL: `https://ttscw.totaltech.net/v4_6_release/apis/3.0/`,
|
baseURL: `https://ttscw.totaltech.net/v4_6_release/apis/3.0/`,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Basic ${process.env.CW_BASIC_TOKEN}`,
|
Authorization: `Basic ${process.env.CW_BASIC_TOKEN?.trim()}`,
|
||||||
clientId: `${process.env.CW_CLIENT_ID}`,
|
clientId: `${process.env.CW_CLIENT_ID?.trim()}`,
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
timeout: 30_000, // 30 s — prevents indefinite hangs on CW API
|
timeout: 30_000, // 30 s — prevents indefinite hangs on CW API
|
||||||
|
|||||||
Reference in New Issue
Block a user