Skip to content

Conversation

chronos25
Copy link

No description provided.

@chronos25 chronos25 requested a review from kamal0808 August 24, 2023 06:55

return utils.sendRequest(options, args, connectionInfo, fetchStockOrdersForSuppliers, retryCounter);
const getOrdersFromSuppliers = utils.sendRequest(options, args, connectionInfo, fetchStockOrdersForSuppliers, retryCounter);
const result = getOrdersFromSuppliers?.data ? getOrdersFromSuppliers?.data : getOrdersFromSuppliers;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getOrdersFromSuppliers?.data || getOrdersFromSuppliers

}

var path = '/api/1.0/consignment/' + args.apiId.value;
var path = '/api/2.0/consignments/' + args.apiId.value;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you considered creating a new path instead of replacing the existing ones?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No

@kamal0808
Copy link
Collaborator

@chronos25 this can be merged.


var path = '/api/consignment_product';
var path = `/api/2.0/consignments/${args.consignmentId.value}/products`;
//var path = '/api/consignment_product';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this commented code before merging, or add the deprecation notice URL in the comment somewhere with reason @chronos25

return utils.sendRequest(options, args, connectionInfo, fetchProductsByConsignment, retryCounter);
return utils.sendRequest(options, args, connectionInfo, fetchProductsByConsignment, retryCounter)
.then(function(response){
return response.data;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a catch block


var path = '/api/consignment_product';
var path = `/api/2.0/consignments/${args.body.consignment_id}/products`;
//var path = '/api/consignment_product';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get rid of commented code or add reason for commenting

return Promise.reject(error);
}
return Promise.resolve(response);
return Promise.resolve(response.data);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catch block required

return utils.sendRequest(options, args, connectionInfo, createStockOrder, retryCounter)
.then(function(response){
return response.data;
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catch block

return utils.sendRequest(options, args, connectionInfo, updateConsignmentProduct, retryCounter);
return utils.sendRequest(options, args, connectionInfo, updateConsignmentProduct, retryCounter)
.then(function(response){
return response.data;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catch block

return utils.sendRequest(options, args, connectionInfo, markStockOrderAsSent, retryCounter);
return utils.sendRequest(options, args, connectionInfo, markStockOrderAsSent, retryCounter)
.then(function(response){
return response.data;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catch block

return utils.sendRequest(options, args, connectionInfo, markStockOrderAsReceived, retryCounter);
return utils.sendRequest(options, args, connectionInfo, markStockOrderAsReceived, retryCounter)
.then(function(response){
return response.data;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catch block

return utils.sendRequest(options, args, connectionInfo, deleteStockOrder, retryCounter);
return utils.sendRequest(options, args, connectionInfo, deleteStockOrder, retryCounter)
.then(function(response){
return response.data;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catch block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants