13 lines
431 B
JavaScript
13 lines
431 B
JavaScript
const propertyService = require('../propertyService')
|
|
module.exports = (eventEmitter) => {
|
|
eventEmitter.on('updateProperty', async (propertyData) => {
|
|
try {
|
|
if (propertyData && propertyData._id) {
|
|
await propertyService.indexOneProperty(propertyData._id)
|
|
}
|
|
} catch (err) {
|
|
console.warn('Error in updateProperty event handler:', err.message)
|
|
}
|
|
})
|
|
}
|