fix(biji): 优化笔记编辑器自动保存机制并修复相关问题
- 实现了更可靠的自动保存功能,仅在用户停止输入后触发保存操作 - 修复了切换笔记时意外触发自动保存的问题 - 优化了重命名文件后的预览更新逻辑 - 调整了保存成功后的状态清理策略,提高了用户体验
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.test.bijihoudaun.controller;
|
||||
|
||||
import com.test.bijihoudaun.common.response.R;
|
||||
import com.test.bijihoudaun.service.ImageCleanupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -25,8 +26,8 @@ public class ImageCleanupController {
|
||||
*/
|
||||
@PostMapping("/cleanup-images")
|
||||
@PreAuthorize("hasRole('ADMIN')")
|
||||
public ResponseEntity<?> cleanupImages() {
|
||||
public R<?> cleanupImages() {
|
||||
int deletedCount = imageCleanupService.cleanupRedundantImages();
|
||||
return ResponseEntity.ok().body("成功清理 " + deletedCount + " 个冗余图片");
|
||||
return R.success("成功清理 " + deletedCount + " 个冗余图片");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user