Skip to content

Commit

Permalink
Merge pull request #31 from WSE-research/addingTests
Browse files Browse the repository at this point in the history
Removed token auth for now
  • Loading branch information
dschiese authored May 24, 2024
2 parents 2650304 + 870e673 commit 3cbc6d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.wse</groupId>
<artifactId>qanary-explanation-service</artifactId>
<version>3.2.3</version>
<version>3.2.4</version>
<name>Qanary explanation service</name>
<description>Webservice for rule-based explanation of QA-Systems as well as specific components</description>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.Map;

@RestController
@ControllerAdvice
Expand Down Expand Up @@ -141,9 +142,7 @@ public ResponseEntity<?> getOutputExplanation(
}
"""
)
public ResponseEntity<?> getComposedExplanationInputData(@RequestBody ComposedExplanationDTO composedExplanationDTO, @RequestHeader("Authorization") String authToken) {
if (authToken != gptRequestAuthToken)
return new ResponseEntity<>(null, HttpStatus.UNAUTHORIZED);
public ResponseEntity<?> getComposedExplanationInputData(@RequestBody ComposedExplanationDTO composedExplanationDTO) {
try {
ComposedExplanation composedExplanationInputData = this.explanationService.composedExplanationForInputData(composedExplanationDTO);
return new ResponseEntity<>(composedExplanationInputData, HttpStatus.OK);
Expand Down Expand Up @@ -178,9 +177,7 @@ public ResponseEntity<?> getComposedExplanationInputData(@RequestBody ComposedEx
}
"""
)
public ResponseEntity<?> getComposedExplanationOutputData(@RequestBody ComposedExplanationDTO composedExplanationDTO, @RequestHeader("Authorization") String authToken) {
if (authToken != gptRequestAuthToken)
return new ResponseEntity<>(null, HttpStatus.UNAUTHORIZED);
public ResponseEntity<?> getComposedExplanationOutputData(@RequestBody ComposedExplanationDTO composedExplanationDTO) {
try {
ComposedExplanation composedExplanationInputData = this.explanationService.composedExplanationsForOutputData(composedExplanationDTO);
return new ResponseEntity<>(composedExplanationInputData, HttpStatus.OK);
Expand Down

0 comments on commit 3cbc6d3

Please sign in to comment.