feat: renamex title to sectionId and added a new shared API call
Some checks failed
Format / formatting (push) Failing after 5s
CI / build (push) Successful in 11s

This commit is contained in:
Pierre Tellier
2025-02-26 15:55:33 +01:00
parent 8d4dc7916d
commit 5c3b2b138d
7 changed files with 61 additions and 108 deletions

View File

@ -21,22 +21,18 @@ public class SharedApi {
}
/**
* TODO: It does not looks like a good id to have the title and the date in the url. What even
* TODO: is the title btw ? if this is the LC section, wouldn't it be better to use an ID ?
* TODO: choose return type, cf comment in LCSection
*
* <p>Endpoint used to get the data inside the lean canvas
* Endpoint used to get the data inside the lean canvas
*
* @return a list of lean canvas sections
*/
@GetMapping("/shared/project/lcsection/{projectId}/{title}/{date}")
@GetMapping("/shared/project/lcsection/{projectId}/{sectionId}/{date}")
public Iterable<SectionCell> getLCSection(
@PathVariable("projectId") String projectId,
@PathVariable("title") String title,
@PathVariable("projectId") Long projectId,
@PathVariable("sectionId") Long sectionId,
@PathVariable("date") String date,
@AuthenticationPrincipal Jwt principal) {
return sharedApiService.getLCSection(
projectId, title, date, principal.getClaimAsString("email"));
return sharedApiService.getSectionCells(
projectId, sectionId, date, principal.getClaimAsString("email"));
}
/**