Skip to content

Commit

Permalink
♻️ Cas candidature
Browse files Browse the repository at this point in the history
  • Loading branch information
benjlevesque committed Feb 21, 2025
1 parent d53ff1b commit 75729d5
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Candidature } from '@potentiel-domain/candidature';

import { IdentifiantParameter } from '@/utils/identifiantParameter';
import { decodeParameter } from '@/utils/decodeParameter';
import { récupérerLauréat } from '@/app/_helpers';

// TODO: à supprimer pour utiliser directement Routes.Document.télécharger dans le front
// une fois qu'on aura migré la page Projet
Expand All @@ -36,7 +35,16 @@ export const GET = async (_: Request, { params: { identifiant } }: IdentifiantPa
},
});

const { nomProjet } = await récupérerLauréat(identifiantProjet);
const candidature = await mediator.send<Candidature.ConsulterCandidatureQuery>({
type: 'Candidature.Query.ConsulterCandidature',
data: {
identifiantProjet,
},
});
if (Option.isNone(candidature)) {
return notFound();
}
const { nomProjet } = candidature;

return new Response(result.content, {
headers: {
Expand Down

0 comments on commit 75729d5

Please sign in to comment.