File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,18 @@ export default {
2929 async run ( { $ } ) {
3030 const response = await this . app . getPrices ( {
3131 $,
32- data : [
33- {
34- product_qty : this . productQty ,
35- product_sku : this . productSku ,
36- } ,
37- ] ,
32+ data : {
33+ products : [
34+ {
35+ product_qty : this . productQty ,
36+ product_sku : this . productSku ,
37+ } ,
38+ ] ,
39+ } ,
3840 } ) ;
39- $ . export ( "$summary" , "Successfully sent the request" ) ;
41+ $ . export ( "$summary" , `Successfully retrieved ${ response . prices . length } ${ response . prices . length > 1
42+ ? "prices"
43+ : "price" } for product SKU ${ this . productSku } `) ;
4044 return response ;
4145 } ,
4246} ;
Original file line number Diff line number Diff line change @@ -97,6 +97,15 @@ export default {
9797 headers,
9898 ...otherOpts
9999 } = opts ;
100+ console . log ( {
101+ ...otherOpts ,
102+ url : this . _baseUrl ( ) + path ,
103+ headers : {
104+ "web_api_key" : `${ this . $auth . web_api_key } ` ,
105+ "app_key" : `${ this . $auth . app_key } ` ,
106+ ...headers ,
107+ } ,
108+ } ) ;
100109 return axios ( $ , {
101110 ...otherOpts ,
102111 url : this . _baseUrl ( ) + path ,
You can’t perform that action at this time.
0 commit comments