Takes were mismade
This commit is contained in:
@@ -8,14 +8,11 @@ public class ControllerPathConfig {
|
||||
//ErrorController
|
||||
public static final String ERROR = "/error";
|
||||
|
||||
//ItemController
|
||||
public static final String ARTICLE_ADD = "/item";
|
||||
public static final String ARTICLE_GET = "/item";
|
||||
public static final String ARTICLE_UPDATE = "/item";
|
||||
public static final String ARTICLE_DELETE = "/item";
|
||||
public static final String ARTICLE_GET_ALL = "/item/all";
|
||||
//ArticleController
|
||||
public static final String ARTICLE_BASE = "/item";
|
||||
public static final String ARTICLE_GET_ALL = ARTICLE_BASE + "/all";
|
||||
|
||||
//ImageController
|
||||
public static final String IMAGE_BASE = "/image";
|
||||
public static final String IMAGE_ADD = "/image/add";
|
||||
}
|
||||
private static final String IMAGE_BASE = "/image";
|
||||
public static final String IMAGE_GET_ALL = IMAGE_BASE + "/all";
|
||||
}
|
||||
@@ -35,14 +35,14 @@ public class ArticleController {
|
||||
return ResponseEntity.ok(articleModelFactory.from(articleService.findAll()));
|
||||
}
|
||||
|
||||
@RequestMapping(path = ARTICLE_GET, method = RequestMethod.GET, produces = "application/json")
|
||||
@RequestMapping(path = ARTICLE_BASE, method = RequestMethod.GET, produces = "application/json")
|
||||
public ResponseEntity<ArticleModel> getByUUID(HttpServletRequest request,
|
||||
@RequestParam(value = PARAM_UUID) UUID uuid) {
|
||||
logRequest(request);
|
||||
return ResponseEntity.ok(articleModelFactory.from(articleService.findByUUID(uuid)));
|
||||
}
|
||||
|
||||
@RequestMapping(path = ARTICLE_ADD, method = RequestMethod.POST, produces = "application/json")
|
||||
@RequestMapping(path = ARTICLE_BASE, method = RequestMethod.POST, produces = "application/json")
|
||||
public ResponseEntity<Boolean> add(HttpServletRequest request,
|
||||
@RequestBody Article article) {
|
||||
logRequest(request);
|
||||
@@ -56,7 +56,7 @@ public class ArticleController {
|
||||
return ResponseEntity.ok(a != null);
|
||||
}
|
||||
|
||||
@RequestMapping(path = ARTICLE_DELETE, method = RequestMethod.DELETE, produces = "application/json")
|
||||
@RequestMapping(path = ARTICLE_BASE, method = RequestMethod.DELETE, produces = "application/json")
|
||||
public ResponseEntity<Boolean> update(HttpServletRequest request,
|
||||
@RequestParam(value = PARAM_UUID) UUID uuid,
|
||||
@RequestBody Article article) {
|
||||
|
||||
Reference in New Issue
Block a user