Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔀 Intégration des modifications de la release 3.30 #2231

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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