File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments