feat(功能): 增加笔记重命名和导出功能- 在笔记列表和预览页面添加重命名功能
- 实现笔记内容自动保存机制 -增加笔记导出为 Markdown 文件的功能 - 优化后端接口,支持更新笔记标题
This commit is contained in:
@@ -101,4 +101,16 @@ public class MarkdownController {
|
||||
List<MarkdownFile> files = markdownFileService.searchByTitle(keyword);
|
||||
return R.success(files);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新Markdown文件标题")
|
||||
@PutMapping("/{id}/title")
|
||||
public R<MarkdownFile> updateMarkdownTitle(
|
||||
@PathVariable Long id,
|
||||
@RequestBody String title) {
|
||||
MarkdownFile updatedFile = markdownFileService.updateMarkdownTitle(id, title);
|
||||
if (updatedFile != null) {
|
||||
return R.success(updatedFile);
|
||||
}
|
||||
return R.fail("文件未找到或更新失败");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user