Mario Martínez Hernández před 1 měsícem
rodič
revize
9e921a060a

+ 2 - 1
src/main/java/es/uv/saic/feign/ProceduresClient.java

@@ -11,6 +11,7 @@ import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
@@ -41,7 +42,7 @@ public interface ProceduresClient {
 
     @PostMapping("/procedure/save/{id}")
 	@ResponseBody
-	public HashMap<String, Object> saveDraft(@PathVariable BigInteger id, @RequestParam String text, 
+	public HashMap<String, Object> saveDraft(@PathVariable BigInteger id, @RequestBody String text, 
         @RequestParam boolean manual, @RequestParam String usuari);
 
     @GetMapping("/procedure/drafts/{id}")

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

@@ -196,11 +196,7 @@ public class ProceduresController {
 			model.addAttribute("location", "procedures");
 		}
 		
-		if (response == null) {
-			return "401";
-		}
-		
-		return "procedures";
+		return model.getAttribute("date").toString() == null ? "No se pudo obtener la fecha" : model.getAttribute("date").toString();
 	}
 
 	/*