feat/issue-751-journey-item-crud-api #791

Merged
marcel merged 69 commits from feat/issue-751-journey-item-crud-api into feat/issue-750-lesereisen-data-model 2026-06-09 12:08:58 +02:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 99111273e5 - Show all commits

View File

@@ -1012,7 +1012,7 @@ public class DocumentService {
* under the current single-tenant model where all authenticated users share
* the same document scope. Called within a caller-provided transaction.
*/
public Document getSummaryById(UUID id) {
public Document findSummaryByIdInternal(UUID id) {
return documentRepository.findById(id)
.orElseThrow(() -> DomainException.notFound(ErrorCode.DOCUMENT_NOT_FOUND, "Document not found: " + id));
}

View File

@@ -70,7 +70,7 @@ public class JourneyItemService {
Document doc = null;
if (dto.getDocumentId() != null) {
doc = documentService.getSummaryById(dto.getDocumentId());
doc = documentService.findSummaryByIdInternal(dto.getDocumentId());
}
int nextPosition = journeyItemRepository.findMaxPositionByGeschichteId(geschichteId)

View File

@@ -240,7 +240,7 @@ class JourneyItemServiceTest {
Geschichte journey = journey(geschichteId);
when(geschichteQueryService.findById(geschichteId)).thenReturn(Optional.of(journey));
when(journeyItemRepository.countByGeschichteId(geschichteId)).thenReturn(0L);
when(documentService.getSummaryById(docId))
when(documentService.findSummaryByIdInternal(docId))
.thenThrow(DomainException.notFound(ErrorCode.DOCUMENT_NOT_FOUND, "not found"));
JourneyItemCreateDTO dto = new JourneyItemCreateDTO();