From 0535be2ea23da73e09eed599f2216746f6e8565e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:05:15 +0000 Subject: [PATCH 1/5] Update dependency org.springframework.boot:spring-boot-starter-parent to v3.3.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1a423c7..d6f8850 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.springframework.boot spring-boot-starter-parent - 3.3.4 + 3.3.5 From 0e695fad848cd3d836a012f0cc73b0467eb6b9fa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:40:46 +0000 Subject: [PATCH 2/5] Update coverallsapp/github-action action to v2.3.4 --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index be1fc05..eb05930 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -49,6 +49,6 @@ jobs: uses: advanced-security/maven-dependency-submission-action@49866fead7de0b0083b89f5f653f9620548ccddf - name: Coveralls GitHub Action - uses: coverallsapp/github-action@v2.3.3 + uses: coverallsapp/github-action@v2.3.4 with: fail-on-error: false From 52e4a07454d375ebf6b02079a06585682c96e517 Mon Sep 17 00:00:00 2001 From: QDIBYS Date: Mon, 28 Oct 2024 10:40:24 +0100 Subject: [PATCH 3/5] Return error on single campaign endpoint --- .../insee/genesis/controller/rest/ResponseController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/insee/genesis/controller/rest/ResponseController.java b/src/main/java/fr/insee/genesis/controller/rest/ResponseController.java index 1b82920..a5541c7 100644 --- a/src/main/java/fr/insee/genesis/controller/rest/ResponseController.java +++ b/src/main/java/fr/insee/genesis/controller/rest/ResponseController.java @@ -135,7 +135,11 @@ public ResponseEntity saveResponsesFromXmlCampaignFolder(@RequestParam(" } catch (GenesisException e) { return ResponseEntity.status(e.getStatus()).body(e.getMessage()); } - return ResponseEntity.ok("Data saved"); + if (errors.isEmpty()){ + return ResponseEntity.ok("Data saved"); + }else{ + return ResponseEntity.internalServerError().body(errors.getFirst().getMessage()); + } } //SAVE ALL From ca5b78a4bc4dbcb57c490fc79134fe47654177cc Mon Sep 17 00:00:00 2001 From: QDIBYS Date: Mon, 28 Oct 2024 10:46:05 +0100 Subject: [PATCH 4/5] Add qualifier on adapter --- .../genesis/infrastructure/adapter/ScheduleMongoAdapter.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/fr/insee/genesis/infrastructure/adapter/ScheduleMongoAdapter.java b/src/main/java/fr/insee/genesis/infrastructure/adapter/ScheduleMongoAdapter.java index 00afd80..c0e77a6 100644 --- a/src/main/java/fr/insee/genesis/infrastructure/adapter/ScheduleMongoAdapter.java +++ b/src/main/java/fr/insee/genesis/infrastructure/adapter/ScheduleMongoAdapter.java @@ -8,6 +8,7 @@ import fr.insee.genesis.infrastructure.repository.ScheduleMongoDBRepository; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Query; @@ -19,6 +20,7 @@ import java.util.List; @Service +@Qualifier("scheduleMongoAdapter") @Slf4j public class ScheduleMongoAdapter implements SchedulePersistencePort { private final ScheduleMongoDBRepository scheduleMongoDBRepository; From b770bfa6b45f4ef9a72482cef61d1d2afa36ba87 Mon Sep 17 00:00:00 2001 From: QDIBYS Date: Mon, 28 Oct 2024 10:48:20 +0100 Subject: [PATCH 5/5] Added qualifier on SurveyUnitMongoAdapter --- .../genesis/infrastructure/adapter/SurveyUnitMongoAdapter.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/fr/insee/genesis/infrastructure/adapter/SurveyUnitMongoAdapter.java b/src/main/java/fr/insee/genesis/infrastructure/adapter/SurveyUnitMongoAdapter.java index 375b0a5..d8a64d1 100644 --- a/src/main/java/fr/insee/genesis/infrastructure/adapter/SurveyUnitMongoAdapter.java +++ b/src/main/java/fr/insee/genesis/infrastructure/adapter/SurveyUnitMongoAdapter.java @@ -11,6 +11,7 @@ import fr.insee.genesis.infrastructure.repository.SurveyUnitMongoDBRepository; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.stereotype.Service; @@ -23,6 +24,7 @@ @Slf4j @Service +@Qualifier("surveyUnitMongoAdapter") public class SurveyUnitMongoAdapter implements SurveyUnitPersistencePort { private SurveyUnitMongoDBRepository mongoRepository;