ADD: Events
ADD: Index One Belonging ADD: Belonging Code
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
const belongingService = require('../belongingService')
|
||||
module.exports = (eventEmitter) => {
|
||||
eventEmitter.on('createBelonging', async (belongingData) => {
|
||||
await belongingService.indexOneBelonging(belongingData._id)
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
const belongingService = require('../belongingService')
|
||||
module.exports = (eventEmitter) => {
|
||||
eventEmitter.on('deleteBelonging', async (belongingData) => {
|
||||
await belongingService.indexAllBelongings()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user