修bug,顺便修改接口名
This commit is contained in:
@@ -60,7 +60,7 @@ public class PostController {
|
||||
* @param postId 动态ID
|
||||
* @return 动态对象
|
||||
*/
|
||||
@PostMapping("/postById/{postId}")
|
||||
@PostMapping("/{postId}")
|
||||
public Result<PostEditVO> getPostById(@PathVariable Long postId) {
|
||||
PostEditVO postEditVO = postService.getPostForEdit(postId);
|
||||
return Result.success(ResultCode.SUCCESS,"查询成功", postEditVO);
|
||||
@@ -72,7 +72,7 @@ public class PostController {
|
||||
* @param postRequestDTO 动态信息
|
||||
* @return 更新后的动态对象
|
||||
*/
|
||||
@PostMapping("/updatePost/{postId}")
|
||||
@PostMapping("/{postId}/updatePost")
|
||||
public Result<PostEditVO> updatePost(@PathVariable Long postId, @RequestBody PostRequestDTO postRequestDTO) {
|
||||
PostEditVO result = postService.updatePost(postId, postRequestDTO);
|
||||
return Result.success(ResultCode.SUCCESS_REVIEW, "动态更新成功", result);
|
||||
|
||||
Reference in New Issue
Block a user