remove unused code

This commit is contained in:
Efstratios Giannopoulos 2024-04-19 12:26:37 +03:00
parent 8f45c14a51
commit 0db2f12b1d
1 changed files with 0 additions and 30 deletions

View File

@ -1,30 +0,0 @@
package eu.eudat.controllers;
import eu.eudat.authorization.Permission;
import eu.eudat.logic.services.ExternalValidationService;
import gr.cite.commons.web.authz.service.AuthorizationService;
import gr.cite.tools.exception.MyNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping(path = {"api/validation"})
public class ExternalValidationController {
private ExternalValidationService externalValidationService;
private final AuthorizationService authorizationService;
@Autowired
public ExternalValidationController(ExternalValidationService externalValidationService, AuthorizationService authorizationService) {
this.externalValidationService = externalValidationService;
this.authorizationService = authorizationService;
}
@GetMapping(path = {""}, produces = "application/json")
public @ResponseBody Boolean validate(@RequestParam(value = "query", required = false) String query, @RequestParam(value = "type", required = false) String type
) throws MyNotFoundException {
this.authorizationService.authorizeForce(Permission.AuthenticatedRole);
return this.externalValidationService.validateIdentifier(query, type);
}
}