PUT works
This commit is contained in:
		
							
								
								
									
										6
									
								
								.idea/workspace.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.idea/workspace.xml
									
									
									
										generated
									
									
									
								
							| @@ -20,11 +20,7 @@ | ||||
|   </component> | ||||
|   <component name="ChangeListManager"> | ||||
|     <list default="true" id="458cde88-df3d-44bc-9d57-a33823e2f1a6" name="Default Changelist" comment=""> | ||||
|       <change afterPath="$PROJECT_DIR$/src/main/resources/static/js/jquery.js" afterDir="false" /> | ||||
|       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> | ||||
|       <change beforePath="$PROJECT_DIR$/src/main/java/com/release11/klaus/controller/MockController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/release11/klaus/controller/MockController.java" afterDir="false" /> | ||||
|       <change beforePath="$PROJECT_DIR$/src/main/resources/static/js/datatransfer.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/static/js/datatransfer.js" afterDir="false" /> | ||||
|       <change beforePath="$PROJECT_DIR$/src/main/resources/templates/mock.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/mock.html" afterDir="false" /> | ||||
|     </list> | ||||
|     <option name="SHOW_DIALOG" value="false" /> | ||||
|     <option name="HIGHLIGHT_CONFLICTS" value="true" /> | ||||
| @@ -313,7 +309,7 @@ | ||||
|       <workItem from="1612259068808" duration="10440000" /> | ||||
|       <workItem from="1612279535476" duration="5692000" /> | ||||
|       <workItem from="1612442837870" duration="8318000" /> | ||||
|       <workItem from="1612609113694" duration="5466000" /> | ||||
|       <workItem from="1612609113694" duration="6024000" /> | ||||
|     </task> | ||||
|     <task id="LOCAL-00077" summary="testing jenkins docker"> | ||||
|       <created>1601453886631</created> | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| package com.release11.klaus.controller; | ||||
|  | ||||
| import com.fasterxml.jackson.databind.ObjectMapper; | ||||
| import com.release11.klaus.model.MockedMessageDto; | ||||
| import com.release11.klaus.service.KlausService; | ||||
| import lombok.AllArgsConstructor; | ||||
| @@ -48,8 +49,11 @@ public class MockController { | ||||
|         return "mock"; | ||||
|     } | ||||
|  | ||||
|     @SneakyThrows | ||||
|     @PutMapping("/mock/json") | ||||
|     public ResponseEntity<String> updateMessage(@RequestBody MockedMessageDto message){ | ||||
|     public ResponseEntity<String> updateMessage(@RequestBody String body){ | ||||
|         ObjectMapper mapper = new ObjectMapper(); | ||||
|         MockedMessageDto message = mapper.readValue(body, MockedMessageDto.class); | ||||
|         return klausService.setMockedResponse(message); | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user