Skip to content

Commit

Permalink
fix: api-svc headers (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirgene authored Sep 9, 2022
1 parent 90188ae commit b1b57fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ services:
- "9092:9092"
environment:
ALLOW_PLAINTEXT_LISTENER: "yes"
# KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_LISTENERS: LISTENER_DOCKER://kafka:29092,LISTENER_INTERN://kafka:9093,LISTENER_EXTERN://0.0.0.0:9092
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER://kafka:29092,LISTENER_INTERN://kafka:9093,LISTENER_EXTERN://127.0.0.1:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER:PLAINTEXT,LISTENER_INTERN:PLAINTEXT,LISTENER_EXTERN:PLAINTEXT
Expand Down
10 changes: 5 additions & 5 deletions modules/api-svc/src/OutboundServer/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ const postBulkTransactions = async (ctx) => {
try {
const msg = new SDKOutboundBulkRequestReceivedDmEvt({
bulkRequest: ctx.request.body,
headers: ctx.request.headers,
headers: [ctx.request.headers],
timestamp: Date.now(),
});
await ctx.state._eventProducer.sendDomainEvent(msg);
await ctx.state.eventProducer.sendDomainEvent(msg);
ctx.state.eventLogger.info(`Sent domain event ${msg.getName()}`);

ctx.response.status = 204;
Expand All @@ -293,20 +293,20 @@ const putBulkTransactions = async (ctx) => {
msg = new SDKOutboundBulkAcceptPartyInfoReceivedDmEvt({
bulkId: ctx.state.path.params.bulkTransactionId,
bulkTransactionContinuationAcceptParty: ctx.request.body,
headers: ctx.request.headers,
headers: [ctx.request.headers],
timestamp: Date.now(),
});
} else if (ctx.request.body.individualTransfers[0]?.hasOwnProperty('acceptQuote')) {
msg = new SDKOutboundBulkAcceptQuoteReceivedDmEvt({
bulkId: ctx.state.path.params.bulkTransactionId,
bulkTransactionContinuationAcceptQuote: ctx.request.body,
headers: ctx.request.headers,
headers: [ctx.request.headers],
timestamp: Date.now(),
});
}

if (msg) {
await ctx.state._eventProducer.sendDomainEvent(msg);
await ctx.state.eventProducer.sendDomainEvent(msg);
ctx.state.eventLogger.info(`Sent domain event ${msg.getName()}`);
}

Expand Down

0 comments on commit b1b57fc

Please sign in to comment.