|
|
@@ -50,17 +50,16 @@ public class PlantillaController {
|
|
|
}
|
|
|
|
|
|
@GetMapping("/plantilla/{versio}/{codi}/{ambit}")
|
|
|
- public ResponseEntity<?> findByVersioCodiAmbit(@PathVariable Integer versio,
|
|
|
+ public Plantilla findByVersioCodiAmbit(@PathVariable Integer versio,
|
|
|
@PathVariable String codi,
|
|
|
@PathVariable String ambit) {
|
|
|
try {
|
|
|
Plantilla plantilla = ps.findByVersioCodiAmbit(versio, codi, ambit);
|
|
|
|
|
|
- return (plantilla != null) ? ResponseEntity.ok(plantilla) :
|
|
|
- ResponseEntity.badRequest().body("No existe la plantilla buscada") ;
|
|
|
+ return plantilla ;
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
- return ResponseEntity.badRequest().body("No se ha podido recoger la plantilla " + e.getMessage());
|
|
|
+ return null;
|
|
|
}
|
|
|
}
|
|
|
|