feat: started test for EntrepreneurServiceApi
Some checks failed
Format / formatting (push) Successful in 5s
Build / build (push) Failing after 37s
CI / build (push) Successful in 11s

This commit is contained in:
Théo Le Lez
2025-04-02 10:25:50 +02:00
parent 137bc84c21
commit 5b6b647697
7 changed files with 183 additions and 24 deletions

View File

@ -33,9 +33,9 @@ public class EntrepreneurApiService {
this.utilsService = utilsService;
}
public void editSectionCell(Long sectionCellId, SectionCell sectionCell, String mail) {
SectionCell editSectionCell = sectionCellService.getSectionCellById(sectionCellId);
if (editSectionCell == null) {
public void editSectionCell(Long sectionCellId, String content, String mail) {
SectionCell sectionCell = sectionCellService.getSectionCellById(sectionCellId);
if (sectionCell == null) {
System.err.println("Trying to edit unknown section cell");
throw new ResponseStatusException(
HttpStatus.NOT_FOUND, "Cette cellule de section n'existe pas");
@ -55,11 +55,7 @@ public class EntrepreneurApiService {
mail,
sectionCellId,
this.sectionCellService.getProjectId(sectionCellId));
sectionCellService.updateSectionCell(
sectionCellId,
sectionCell.getSectionId(),
sectionCell.getContentSectionCell(),
sectionCell.getModificationDate());
sectionCellService.updateSectionCell(sectionCellId, content);
}
public void removeSectionCell(Long sectionCellId, String mail) {