Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 43bd4e3

Browse files
Process all pureV5 and pureV5Task challenges of any type
1 parent 877a6af commit 43bd4e3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ const dataHandler = (messageSet, topic, partition) => Promise.each(messageSet, a
5151
return
5252
}
5353

54-
if (_.toUpper(_.get(messageJSON.payload, 'type')) !== 'TASK' || _.toUpper(_.get(messageJSON.payload, 'status')) !== 'COMPLETED') {
55-
logger.info(`The message type ${_.get(messageJSON.payload, 'type')}, status ${_.get(messageJSON.payload, 'status')} doesn't match {type: 'Task', status: 'Completed'}.`)
54+
if (_.toUpper(_.get(messageJSON.payload, 'status')) !== 'COMPLETED') {
55+
logger.info(`The message type ${_.get(messageJSON.payload, 'type')}, status ${_.get(messageJSON.payload, 'status')} doesn't match {status: 'Completed'}.`)
5656

5757
// commit the message and ignore it
5858
await consumer.commitOffset({ topic, partition, offset: m.offset })

src/services/processorService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async function processUpdate(message) {
8282
const payment = _.assign({
8383
memberId: checkpointWinnerMembers[i - 1].userId,
8484
amount: checkpointPrizes[i - 1].value,
85-
desc: `Payment - ${message.payload.name} - ${i} Place`,
85+
desc: `Checkpoint payment - ${message.payload.name} - ${i} Place`,
8686
typeId: config.CHECKPOINT_WINNER_PAYMENT_TYPE_ID
8787
}, basePayment)
8888

@@ -113,7 +113,7 @@ async function processUpdate(message) {
113113
const copilotPayment = _.assign({
114114
memberId: copilotId,
115115
amount: copilotAmount,
116-
desc: (copilotPaymentDesc ? copilotPaymentDesc : `Task - ${message.payload.name} - Copilot`),
116+
desc: (copilotPaymentDesc ? copilotPaymentDesc : `${message.payload.name} - Copilot`),
117117
typeId: config.COPILOT_PAYMENT_TYPE_ID
118118
}, basePayment)
119119
const paymentExists = await paymentService.paymentExists(copilotPayment)

0 commit comments

Comments
 (0)