Skip to content

Commit 440234d

Browse files
Merge pull request #325 from topcoder-platform/feature/topic-bus-key
Feature/topic bus key - oldvalue added
2 parents cc5222d + 7c80214 commit 440234d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/common/helper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,9 @@ async function postEvent (topic, payload, options = {}) {
952952
'mime-type': 'application/json',
953953
payload
954954
}
955-
_.merge(message,options)
955+
if (options.key) {
956+
message.key = options.key
957+
}
956958
await client.postEvent(message)
957959
await eventDispatcher.handleEvent(topic, { value: payload, options })
958960
}

src/services/WorkPeriodService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ async function updateWorkPeriod (currentUser, id, data) {
290290
}
291291

292292
//await helper.postEvent(config.TAAS_WORK_PERIOD_UPDATE_TOPIC, updated.toJSON(), { oldValue: oldValue })
293-
await helper.postEvent(config.TAAS_WORK_PERIOD_UPDATE_TOPIC, updated.toJSON(), {"key":data.resourceBookingId})
293+
await helper.postEvent(config.TAAS_WORK_PERIOD_UPDATE_TOPIC, updated.toJSON(), {oldValue: oldValue, "key":data.resourceBookingId})
294294
return updated.dataValues
295295
}
296296

0 commit comments

Comments
 (0)