From 396030d7fe2fee049402c6622d1b2e78690881b4 Mon Sep 17 00:00:00 2001 From: Yas Asghari <100201381+yasasghari@users.noreply.github.com> Date: Fri, 9 Feb 2024 18:43:51 +0100 Subject: [PATCH] Update CI --- .github/workflows/CI.yml | 9 ++++++++- .../registerservice/controller/RegisterController.java | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4672a60..29be9df 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -36,7 +36,7 @@ jobs: with: name: test-report path: | - jacoco-test.xml + target/site/jacoco/* - name: static analysis run: mvn spotbugs:check @@ -44,3 +44,10 @@ jobs: - name: linting run: mvn checkstyle:check + - name: CI passing merge to develop + if: success() + run: | + git fetch origin + git checkout develop + git merge --no-ff ${{ github.ref }} + git push origin develop diff --git a/src/main/java/com/example/registerservice/controller/RegisterController.java b/src/main/java/com/example/registerservice/controller/RegisterController.java index b0beecc..5885045 100644 --- a/src/main/java/com/example/registerservice/controller/RegisterController.java +++ b/src/main/java/com/example/registerservice/controller/RegisterController.java @@ -7,6 +7,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; +import org.springframework.util.LinkedMultiValueMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -78,7 +79,7 @@ public ResponseEntity registration(@RequestBody PersonDTO personDTO) { } // User is saved to the database if the validation process is passed with no errors. personService.saveApplicant(personDTO); - return new ResponseEntity<>(null, HttpStatus.OK); + return new ResponseEntity<>(new LinkedMultiValueMap<>(), HttpStatus.OK); } catch (Exception e) { return new ResponseEntity<>(new ErrorDTO("INVALID_OPERATION"), HttpStatus.BAD_REQUEST); }