Skip to content

Fait le ménage dans les différentes méthodes findAudit***#1476

Open
hissalht wants to merge 5 commits intomainfrom
refactor-audit-finds
Open

Fait le ménage dans les différentes méthodes findAudit***#1476
hissalht wants to merge 5 commits intomainfrom
refactor-audit-finds

Conversation

@hissalht
Copy link
Copy Markdown
Collaborator

@hissalht hissalht commented Apr 18, 2026

Il existait plusieurs méthodes pour récupérer des audits avec des noms légérements différents, et dont les différences étaient vagues et/ou pas cohérentes.

  • findAuditWithEditUniqueId
  • getAuditWithEditUniqueId
  • getAuditWithConsultUniqueId

Cette PR fait le ménage dans tout ça et ne laisse qu’une seule méthode findAuditWithEditUniqueId() qui retourne une entité Audit avec ses relations (objets nestés) remplies de sorte à pouvoir être retournée directement par l’API (type AuditDto)

TODO (dans une autre PR): refactor la vérification de l’existence d’un audit

@hissalht hissalht temporarily deployed to ara-refactor-audit-find-wk6iwj April 18, 2026 00:46 Inactive
@hissalht hissalht added Nettoyage DX Concerne l'expérience développeur labels Apr 18, 2026
@AdrienMuzyczka AdrienMuzyczka added this to the 39 - 8/04 milestone Apr 22, 2026
}
}
/** Find and return an audit in the format that the API would return */
findAuditWithEditUniqueId(uniqueId: string): Promise<AuditDto> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est-ce qu'on l'appelerait pas simplement findAudit() ? Car la suite du nom suppose justement qu'on puisse le chercher avec autre chose que le editUniqueId, comme avant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DX Concerne l'expérience développeur Nettoyage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants