Skip to content

Commit bf4aaa9

Browse files
authored
switchMap changed to flatMap (#21)
* switchMap changed to flatMap * version bumped up
1 parent 5fbb488 commit bf4aaa9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "email-notifier",
3-
"version": "5.3.0",
3+
"version": "5.5.0",
44
"description": "email notifier to monitor the notificaion kafka topic and send emails.",
55
"main": "app.js",
66
"dependencies": {

‎src/setup.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const Consumer = require('./lib/kafka/consumer')
3232
const Utility = require('./lib/utility')
3333
const Logger = require('@mojaloop/central-services-shared').Logger
3434
const Rx = require('rxjs')
35-
const { filter, switchMap } = require('rxjs/operators')
35+
const { filter, flatMap } = require('rxjs/operators')
3636
const Observables = require('./observables')
3737
const createHealtcheck = require('healthcheck-server')
3838
const Config = require('./lib/config')
@@ -64,7 +64,7 @@ const setup = async () => {
6464

6565
const emailNotification = topicObservable
6666
.pipe(filter(data => data.value.from === hubName),
67-
switchMap(Observables.actionObservable))
67+
flatMap(Observables.actionObservable))
6868
emailNotification.subscribe(result => {
6969
Logger.info(result)
7070
})

0 commit comments

Comments
 (0)