修bug,顺便修改接口名

This commit is contained in:
KilLze
2025-12-28 17:53:16 +08:00
parent e92cd31c27
commit 9c7afc4470

View File

@@ -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);