Streamline parameter names
This commit is contained in:
@@ -15,8 +15,7 @@ import java.util.List;
|
||||
|
||||
import static de.htwsaar.webshop.config.ControllerPathConfig.IMAGE_BASE;
|
||||
import static de.htwsaar.webshop.config.ControllerPathConfig.IMAGE_GET_ALL;
|
||||
import static de.htwsaar.webshop.config.ParameterConfig.PARAM_ARTICLE_ID;
|
||||
import static de.htwsaar.webshop.config.ParameterConfig.PARAM_IMAGE_ID;
|
||||
import static de.htwsaar.webshop.config.ParameterConfig.*;
|
||||
import static de.htwsaar.webshop.util.LoggerUtil.logRequest;
|
||||
|
||||
@RestController
|
||||
@@ -69,7 +68,7 @@ public class ImageController {
|
||||
|
||||
@RequestMapping(path = IMAGE_BASE, method = RequestMethod.PUT, produces = "application/json")
|
||||
public ResponseEntity<Boolean> update(HttpServletRequest request,
|
||||
@RequestParam(value = PARAM_IMAGE_ID) Long imageId,
|
||||
@RequestParam(value = PARAM_ID) Long imageId,
|
||||
@RequestBody Image image) {
|
||||
logRequest(request);
|
||||
if (imageId == null || imageService.getImageById(imageId) == null) {
|
||||
@@ -81,7 +80,7 @@ public class ImageController {
|
||||
|
||||
@RequestMapping(path = IMAGE_BASE, method = RequestMethod.DELETE, produces = "application/json")
|
||||
public ResponseEntity<Boolean> delete(HttpServletRequest request,
|
||||
@RequestParam(value = PARAM_IMAGE_ID) Long imageId) {
|
||||
@RequestParam(value = PARAM_ID) Long imageId) {
|
||||
logRequest(request);
|
||||
if (imageId == null) {
|
||||
log.warn("[{}] got invalid imageId", request.getRequestURI());
|
||||
|
||||
Reference in New Issue
Block a user