Tech: Refacto de l'objet LegacyControlUnit et LegacyControlResources - #2973
Tech: Refacto de l'objet LegacyControlUnit et LegacyControlResources#2973maximeperraultdev wants to merge 3 commits into
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
8437660 to
5680ec9
Compare
|
8ae3aa4 to
deca74b
Compare
cf0bdce to
0de958e
Compare
| package fr.gouv.cacem.monitorenv.domain.entities.controlUnit | ||
|
|
||
| // TODO Replace this entity with `ControlUnitEntity`. It's left for `MissionEntity.units` backward compatibility. | ||
| data class LegacyControlUnitEntity( |
There was a problem hiding this comment.
Il ne faut pas supprimer cette Entité?
There was a problem hiding this comment.
Non elle sert encore pour les endpoint qui l'utilisait. J'ai uniquement séparé en 3 data class.
Legac
| isArchived = false, | ||
| note = null, | ||
| photo = null, | ||
| // TODO: ??? |
| note = null, | ||
| photo = null, | ||
| // TODO: ??? | ||
| stationId = 1, |
There was a problem hiding this comment.
pourquoi stationId = 1
There was a problem hiding this comment.
houla oups.
| controlUnits = dto.mission.controlUnits, | ||
| controlUnits = | ||
| dto.mission.controlUnits.map { | ||
| LegacyControlUnitDataOutput.fromControlUnit( |
There was a problem hiding this comment.
pourquoi LegacyControlUnitDataOutput ?
There was a problem hiding this comment.
on laisse les legacyDataOutput et Input. Avant on avait des legacyControlUnitEntity. Ce qui posait des soucis pour les consommateurs de nos apis si on changeait l'entité.
There was a problem hiding this comment.
Mais j'avoue que je pourrais les nommer autrement car il n'y en a pas d'autres...
| controlUnits = mission.controlUnits, | ||
| controlUnits = | ||
| mission.controlUnits.map { | ||
| LegacyControlUnitDataOutput.fromControlUnit( |
There was a problem hiding this comment.
pourquoi LegacyControlUnitDataOutput ?
| controlUnits = dto.mission.controlUnits, | ||
| controlUnits = | ||
| dto.mission.controlUnits.map { | ||
| LegacyControlUnitDataOutput.fromControlUnit( |
| controlUnits = mission.controlUnits, | ||
| controlUnits = | ||
| mission.controlUnits.map { | ||
| LegacyControlUnitDataOutput.fromControlUnit( |
|
|
||
| import type { ControlTheme } from '../domain/entities/controlThemes' | ||
|
|
||
| export const controlThemesAPI = monitorenvPrivateApi.injectEndpoints({ |
There was a problem hiding this comment.
bah c'était quoi ce fichier ???
There was a problem hiding this comment.
un reliquat du passé je dirais.
0de958e to
45811a5
Compare
ab7d396 to
2b8a506
Compare
|





Uh oh!
There was an error while loading. Please reload this page.