Skip to content

Commit

Permalink
fix(queue-export): send opts to export
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Aug 13, 2024
1 parent cc0acde commit b666794
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions/lib/integration/exports/customers-to-horus.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = async ({ appSdk, storeId, auth }, customerId, opts = {}) => {
const { username, password, baseURL } = appData
const horus = new Horus(username, password, baseURL)
const customerHorus = await getClientByCustomer(storeId, horus, customer)
console.log(`customer: ${customer && JSON.stringify(customerHorus)}`)
console.log(`customer: ${customerHorus && JSON.stringify(customerHorus)}`)
if (isCreate) {
// create/update customer in HORUS
const method = customerHorus && customerHorus?.COD_CLI ? 'PUT' : 'POST'
Expand Down
4 changes: 3 additions & 1 deletion functions/lib/integration/handles-queues/queue-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ const runStore = async ({ appSdk, storeId, auth }, collectionName) => {
// const docId = docFirestore.id
const doc = await getDoc(docFirestore)
const { resource, resourceId } = doc.data()
const opts = doc.data()?.opts
const body = {
storeId,
resource,
resourceId
resourceId,
opts
}
promisesResources.push(
sendMessageTopic(topicExportToHorus, body)
Expand Down

0 comments on commit b666794

Please sign in to comment.