feat(qianduan): 实现 Markdown 文件的更新功能
- 新增 updateMarkdown API 接口,用于更新 Markdown 文件内容 - 在 HomePage 组件中集成 Markdown 编辑器,支持文件编辑和保存 - 优化 MarkdownEditor 组件,支持内容预览和编辑切换 - 更新后端 MarkdownController,增加文件更新相关处理
This commit is contained in:
@@ -67,10 +67,10 @@ public class MarkdownController {
|
||||
})
|
||||
@PostMapping("/{id}")
|
||||
public R<MarkdownFile> updateMarkdown(
|
||||
@PathVariable Long id,
|
||||
@RequestBody String content) {
|
||||
|
||||
MarkdownFile file = markdownFileService.updateMarkdownContent(id, content);
|
||||
@PathVariable String id,
|
||||
String content) {
|
||||
long l = Long.parseLong(id);
|
||||
MarkdownFile file = markdownFileService.updateMarkdownContent(l, content);
|
||||
|
||||
if (file != null) {
|
||||
return R.success(file);
|
||||
|
||||
Reference in New Issue
Block a user