mirror of
https://github.com/colanode/colanode.git
synced 2025-12-16 11:47:47 +01:00
Fix radar service for new node counter updates
This commit is contained in:
@@ -28,6 +28,17 @@ export class AccountMetadataListQueryHandler
|
||||
if (
|
||||
event.type === 'account_created' &&
|
||||
event.account.id === input.accountId
|
||||
) {
|
||||
const result = await this.handleQuery(input);
|
||||
return {
|
||||
hasChanges: true,
|
||||
result,
|
||||
};
|
||||
}
|
||||
|
||||
if (
|
||||
event.type === 'account_deleted' &&
|
||||
event.account.id === input.accountId
|
||||
) {
|
||||
return {
|
||||
hasChanges: true,
|
||||
|
||||
@@ -33,6 +33,18 @@ export class WorkspaceMetadataListQueryHandler
|
||||
event.type === 'workspace_created' &&
|
||||
event.workspace.accountId === input.accountId &&
|
||||
event.workspace.id === input.workspaceId
|
||||
) {
|
||||
const result = await this.handleQuery(input);
|
||||
return {
|
||||
hasChanges: true,
|
||||
result,
|
||||
};
|
||||
}
|
||||
|
||||
if (
|
||||
event.type === 'workspace_deleted' &&
|
||||
event.workspace.accountId === input.accountId &&
|
||||
event.workspace.id === input.workspaceId
|
||||
) {
|
||||
return {
|
||||
hasChanges: true,
|
||||
|
||||
@@ -104,7 +104,7 @@ export class RadarService {
|
||||
}
|
||||
|
||||
if (!this.counters.has(event.counter.nodeId)) {
|
||||
return;
|
||||
this.counters.set(event.counter.nodeId, new Map());
|
||||
}
|
||||
|
||||
const nodeCounters = this.counters.get(event.counter.nodeId);
|
||||
|
||||
Reference in New Issue
Block a user