Преглед изворни кода

Merge branch 'mappings' of UV-APPS/UV_SAIC_DOCS into master

Mario Martínez Hernández пре 1 месец
родитељ
комит
7af4816c2d

+ 1 - 1
src/main/java/es/uv/saic/web/DocumentController.java

@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 
 @RestController
-@RequestMapping("/documents")
+@RequestMapping("/document")
 public class DocumentController {
     @Autowired
     private DocumentService ds;

+ 4 - 4
src/main/java/es/uv/saic/web/DownloadController.java

@@ -275,7 +275,7 @@ public class DownloadController {
 	 * @param response HttpServletResponse
 	 * @return A byte array representing the populated template
 	 */
-	@GetMapping(value="/test/template/{titulacio}/{centre}/{idProces}/{idTascap}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
+	@GetMapping(value="/download/test/template/{titulacio}/{centre}/{idProces}/{idTascap}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
 	@ResponseBody
 	public ResponseEntity<byte[]> testTemplate(@PathVariable("titulacio") Integer idTitulacio, @PathVariable("centre") Integer idCentre,
 			@PathVariable("idTascap") Integer idTascap, @PathVariable("idProces") Integer idProces, HttpServletResponse response) 
@@ -357,7 +357,7 @@ public class DownloadController {
 	 * @param response HttpServletResponse
 	 * @return A byte array representing the populated template
 	 */
-	@GetMapping(value="/test/template2/{titulacio}/{centre}/{evidencia}/{curs}/{tipusTasca}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
+	@GetMapping(value="/download/test/template2/{titulacio}/{centre}/{evidencia}/{curs}/{tipusTasca}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
 	@ResponseBody
 	public ResponseEntity<byte[]> testTemplate(Model model, @PathVariable("titulacio") Integer idTitulacio, @PathVariable("centre") Integer idCentre,
 			@PathVariable("evidencia") String evidencia, @PathVariable("curs") Integer curs, @PathVariable("tipusTasca") Integer tipusTasca, 
@@ -437,7 +437,7 @@ public class DownloadController {
 	 * @param response HttpServletResponse
 	 * @return A byte array representing the generated PDF
 	 */
-	@GetMapping(value="/pdf/{idTascai}")
+	@GetMapping(value="/download/pdf/{idTascai}")
 	@ResponseBody
 	public byte[] downloadTemplatePdf(@PathVariable("idTascai") BigInteger idTascai, HttpServletResponse response) throws IOException, InterruptedException {
 		InstanciaTascaDTO it = tc.findInstanciaTascaById(idTascai);
@@ -453,7 +453,7 @@ public class DownloadController {
 	 * @param idtascai Optional ID of the task instance for context
 	 * @param response HttpServletResponse
 	 */
-	@PostMapping(value="/pdf/preview")
+	@PostMapping(value="/download/pdf/preview")
 	@ResponseBody
 	public byte[] downloadTemplatePdf(HttpServletResponse response,
 			@RequestBody PdfDTO pdf) throws IOException, InterruptedException {