File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " shipthisapi-js" ,
3- "version" : " 2.0.7 " ,
3+ "version" : " 2.0.8 " ,
44 "description" : " Wrapper for shipthis api" ,
55 "engines" : {
66 "node" : " >=18"
2424 "scripts" : {
2525 "start" : " node dist/shipthisapi-js/main.js" ,
2626 "clean" : " rimraf coverage build tmp" ,
27- "prebuild" : " node ./scripts/pre-build && npm run lint " ,
27+ "prebuild" : " node ./scripts/pre-build" ,
2828 "build" : " tsc -p tsconfig.prod.json" ,
2929 "postbuild" : " node ./scripts/pre-publish" ,
3030 "build:watch" : " tsc -w -p tsconfig.prod.json" ,
31- "lint" : " eslint ./src" ,
3231 "test" : " jest --coverage" ,
3332 "test:watch" : " jest --watch"
3433 },
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ const prepareHeaders = async (obj: ShipthisAPI) => {
1717 if ( obj . xApiKey ) {
1818 headers [ 'x-api-key' ] = obj . xApiKey || '' ;
1919 }
20+ if ( obj . authorization ) {
21+ headers [ 'authorization' ] = obj . authorization || '' ;
22+ }
2023 return headers ;
2124} ;
2225
@@ -38,6 +41,7 @@ const internalRequest = async (
3841 headers [ 'Access-Control-Allow-Origin' ] = '*' ;
3942 headers [ 'Access-Control-Allow-Credentials' ] = true ;
4043 const query_params = options ?. queryParams || null ;
44+ console . log ( 'headers' , headers ) ;
4145 const config : AxiosRequestConfig = {
4246 method,
4347 url :
You can’t perform that action at this time.
0 commit comments