Skip to content

Commit

Permalink
Publish changes
Browse files Browse the repository at this point in the history
  • Loading branch information
csuvajit committed Apr 7, 2024
1 parent 780985e commit 76bcb83
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/service-auth/src/consumer/consumer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class ConsumerService {
constructor(@Inject(KAFKA_CONSUMER) private consumer: Consumer) {}

async onModuleInit() {
this.consumer.subscribe({ topics: Object.values(LogType), fromBeginning: true });
await this.consumer.subscribe({ topics: Object.values(LogType), fromBeginning: true });

await this.consumer.run({
eachMessage: async ({ message, topic }) => {
Expand Down
14 changes: 14 additions & 0 deletions apps/service-clans/src/service-clans.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,20 @@ export class ClansService {
});
}

if (
payload.donationsLog.length ||
payload.donationsReceivedLog ||
payload.leagueChangeLog ||
payload.memberJoinedLog ||
payload.memberLeftLog ||
payload.reJoinedLog ||
payload.nameChangeLog ||
payload.townHallChangeLog ||
payload.roleChangeLog
) {
this.publish(LogType.CLAN_MEMBER_CHANGE, payload);
}

return payload;
}

Expand Down

0 comments on commit 76bcb83

Please sign in to comment.