Skip to content

Commit 55ed76b

Browse files
chore: merge back release 13.11.25 (#1276)
2 parents d861746 + 9ea71e1 commit 55ed76b

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

apps/backend/src/datasources/stfc/StfcUserDataSource.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,8 @@ export class StfcUserDataSource implements UserDataSource {
779779
async getApprovedProposalVisitorsWithInstitution(
780780
proposalPk: number
781781
): Promise<{ user: User; institution: Institution; country: Country }[]> {
782-
throw new Error('Method not implemented.');
782+
return await postgresUserDataSource.getApprovedProposalVisitorsWithInstitution(
783+
proposalPk
784+
);
783785
}
784786
}

apps/backend/src/eventHandlers/messageBroker.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ export const getProposalMessageData = async (proposal: Proposal) => {
130130

131131
const proposalUsersWithInstitution =
132132
await userDataSource.getProposalUsersWithInstitution(proposal.primaryKey);
133-
134133
const dataAccessUsersWithInstitution =
135134
await dataAccessUsersDataSource.getDataAccessUsersWithInstitution(
136135
proposal.primaryKey
@@ -402,6 +401,19 @@ export async function createPostToRabbitMQHandler() {
402401

403402
const proposal = await proposalDataSource.get(proposalPKey);
404403

404+
const jsonMessage = await getProposalMessageData(proposal!);
405+
await rabbitMQ.sendMessageToExchange(
406+
EXCHANGE_NAME,
407+
Event.PROPOSAL_UPDATED,
408+
jsonMessage
409+
);
410+
break;
411+
}
412+
case Event.DATA_ACCESS_USERS_UPDATED: {
413+
const { proposalPKey } = event;
414+
415+
const proposal = await proposalDataSource.get(proposalPKey);
416+
405417
const jsonMessage = await getProposalMessageData(proposal!);
406418
await rabbitMQ.sendMessageToExchange(
407419
EXCHANGE_NAME,

0 commit comments

Comments
 (0)