Skip to content

Commit

Permalink
fix: noi-techpark#136 fix error handler for put and patch
Browse files Browse the repository at this point in the history
  • Loading branch information
SirCotare committed Jul 7, 2021
1 parent e1fb5d9 commit dd4b38b
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
Expand All @@ -29,6 +31,18 @@ public ResponseEntity<ErrorMessage> handleGet(HttpServletRequest request) {
return handleRequest(request);
}

@PatchMapping(value=PATH, produces="application/json")
@ResponseBody
public ResponseEntity<ErrorMessage> handlePatch(HttpServletRequest request) {
return handleRequest(request);
}

@PutMapping(value=PATH, produces="application/json")
@ResponseBody
public ResponseEntity<ErrorMessage> handlePut(HttpServletRequest request) {
return handleRequest(request);
}

@PostMapping(value=PATH, produces="application/json")
@ResponseBody
public ResponseEntity<ErrorMessage> handlePost(HttpServletRequest request) {
Expand Down

0 comments on commit dd4b38b

Please sign in to comment.