Compare commits

..

No commits in common. "083cc95523b4559aec9f2b5466b07661dd990a47" and "0748256ce8725216b36572ce86c3c5fbc42c76a8" have entirely different histories.

2 changed files with 3 additions and 9 deletions

View File

@ -174,9 +174,7 @@ export class SocketUser {
data.objectType,
data.filter
);
if (typeof callback === 'function') {
callback({ success: true });
}
callback({ success: true });
}
async handleSubscribeToObjectUpdateEvent(data, callback) {
@ -184,9 +182,7 @@ export class SocketUser {
data._id,
data.objectType
);
if (typeof callback === 'function') {
callback(result);
}
callback(result);
}
async handleSubscribeToObjectEventEvent(data) {

View File

@ -2,7 +2,6 @@ import log4js from 'log4js';
import _ from 'lodash';
import { loadConfig } from '../config.js';
import { natsServer } from '../database/nats.js';
import { expandObjectIds } from '../database/utils.js';
const config = loadConfig();
// Setup logger
@ -156,12 +155,11 @@ export class UpdateManager {
`${objectType}s.${id}.object`,
this.socketClient.socketId,
(key, value) => {
const expandedValue = expandObjectIds(value);
logger.trace('Object update event:', id);
this.socketClient.socket.emit('objectUpdate', {
_id: id,
objectType: objectType,
object: { ...expandedValue }
object: { ...value }
});
}
);