Skip to content

Commit

Permalink
🔀 Intégration des modifications de la release 3.30 (#2233)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjlevesque authored Sep 20, 2024
2 parents 4058cfc + db2d25a commit abef2fb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/applications/legacy/src/sagas/candidature.saga.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Message, MessageHandler, mediator } from 'mediateur';
import { Event } from '@potentiel-infrastructure/pg-event-sourcing';
import { Candidature } from '@potentiel-domain/candidature';
import { publishToEventBus } from '../config/eventBus.config';
import { eventStore } from '../config/eventStore.config';
import { DésignationCatégorie, ProjectRawDataImported } from '../modules/project';
import { v4 } from 'uuid';
import { AppelOffre } from '@potentiel-domain/appel-offre';
Expand Down Expand Up @@ -39,7 +39,7 @@ export const register = () => {
switch (event.type) {
case 'CandidatureImportée-V1':
case 'CandidatureCorrigée-V1':
await publishToEventBus(
await eventStore.publish(
new ProjectRawDataImported({
payload: {
importId: v4(),
Expand Down
10 changes: 5 additions & 5 deletions packages/applications/legacy/src/sagas/lauréat.saga.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Message, MessageHandler, mediator } from 'mediateur';
import { Event } from '@potentiel-infrastructure/pg-event-sourcing';
import { Lauréat } from '@potentiel-domain/laureat';
import { publishToEventBus } from '../config/eventBus.config';
import {
ProjectCompletionDueDateSet,
ProjectDCRDueDateSet,
Expand All @@ -14,6 +13,7 @@ import { getDelaiDeRealisation } from '../modules/projectAppelOffre';
import { AppelOffre } from '@potentiel-domain/appel-offre';
import { Option } from '@potentiel-libraries/monads';
import { CandidateNotifiedForPeriode } from '../modules/notificationCandidats';
import { eventStore } from '../config/eventStore.config';

export type SubscriptionEvent = Lauréat.LauréatNotifiéEvent & Event;

Expand Down Expand Up @@ -57,7 +57,7 @@ export const register = () => {
candidateEmail: projet.email,
candidateName: projet.nomRepresentantLegal,
};
await publishToEventBus(
await eventStore.publish(
new ProjectNotified({
payload: {
...basePayload,
Expand All @@ -69,7 +69,7 @@ export const register = () => {
}),
);

await publishToEventBus(
await eventStore.publish(
new CandidateNotifiedForPeriode({
payload: basePayload,
}),
Expand All @@ -81,7 +81,7 @@ export const register = () => {
appelOffre,
projet.technologie ?? 'N/A',
);
await publishToEventBus(
await eventStore.publish(
new ProjectCompletionDueDateSet({
payload: {
projectId: projet.id,
Expand All @@ -91,7 +91,7 @@ export const register = () => {
}),
);

await publishToEventBus(
await eventStore.publish(
new ProjectDCRDueDateSet({
payload: {
projectId: projet.id,
Expand Down
6 changes: 3 additions & 3 deletions packages/applications/legacy/src/sagas/éliminé.saga.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Message, MessageHandler, mediator } from 'mediateur';
import { Event } from '@potentiel-infrastructure/pg-event-sourcing';
import { Éliminé } from '@potentiel-domain/elimine';
import { publishToEventBus } from '../config/eventBus.config';
import { eventStore } from '../config/eventStore.config';
import { ProjectNotified } from '../modules/project';
import { IdentifiantProjet } from '@potentiel-domain/common';
import { getLegacyProjetByIdentifiantProjet } from '../infra/sequelize/queries/project';
Expand Down Expand Up @@ -34,7 +34,7 @@ export const register = () => {
candidateEmail: projet.email,
candidateName: projet.nomRepresentantLegal,
};
await publishToEventBus(
await eventStore.publish(
new ProjectNotified({
payload: {
...basePayload,
Expand All @@ -45,7 +45,7 @@ export const register = () => {
},
}),
);
await publishToEventBus(
await eventStore.publish(
new CandidateNotifiedForPeriode({
payload: basePayload,
}),
Expand Down

0 comments on commit abef2fb

Please sign in to comment.