Skip to content
Snippets Groups Projects
Commit 89b36f8a authored by Rodríguez Ortega, Alejandro's avatar Rodríguez Ortega, Alejandro
Browse files

Disable dangerous method.

parent ec9ded86
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,8 @@ public class AnonymizerAPI { ...@@ -45,7 +45,8 @@ public class AnonymizerAPI {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Successful operation."), @ApiResponse(responseCode = "200", description = "Successful operation."),
@ApiResponse(responseCode = "400", description = "Bad request. (User unknow)")}) @ApiResponse(responseCode = "400", description = "Bad request. (User unknow)")})
@Operation(summary = "Anonymize property that has certain value", description = "Change the value {value} of the {property} for a hash.") @Operation(summary = "Anonymize property that has certain value", description = "Change the value {value} of the {property} for a hash..\\n\""
+ "<br/><br/><b>THIS SERVICE HAS BEEN DISABLED IN THE TEST ENVIRONMENT</b> ")
public ResponseEntity<String> anonymizeUser( public ResponseEntity<String> anonymizeUser(
@Parameter(description = "City where is the data to be processed") @PathVariable City city, @Parameter(description = "City where is the data to be processed") @PathVariable City city,
@Parameter(description = "Model that is going to be anonymized.", example = "vehicle") @PathVariable String model, @Parameter(description = "Model that is going to be anonymized.", example = "vehicle") @PathVariable String model,
......
...@@ -45,14 +45,14 @@ public class AnonymizerService { ...@@ -45,14 +45,14 @@ public class AnonymizerService {
JSONObject object = objects.getJSONObject(i); JSONObject object = objects.getJSONObject(i);
String propertyAnonimizied = Crypto.generateHash((String) object.get(property)); String propertyAnonimizied = Crypto.generateHash((String) object.get(property));
object.put(property, propertyAnonimizied); object.put(property, propertyAnonimizied);
JSONObject result = dataService.updateObjects(object, model, city,object.getString("id")); //JSONObject result = dataService.updateObjects(object, model, city,object.getString("id"));
if (result.has("Error")) { /*if (result.has("Error")) {
return new ResponseEntity<>("Error while anonymizig:" + property + ". Please try again !!\n " + result.getString("Error"), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>("Error while anonymizig:" + property + ". Please try again !!\n " + result.getString("Error"), HttpStatus.INTERNAL_SERVER_ERROR);
} }
else { else {*/
System.out.println(result.toString()); System.out.println("THIS SERVICE HAS BEEN DISABLED IN THE TEST ENVIRONMENT");//result.toString());
} /*}*/
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment