wiki编辑器升级,api接口文档开发

This commit is contained in:
暮光:城中城
2022-01-30 10:24:03 +08:00
parent 24f7eb10d0
commit c13fb2cae4
45 changed files with 8010 additions and 28058 deletions

View File

@@ -2,6 +2,7 @@ package com.zyplayer.doc.wiki.controller;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject;
import com.zyplayer.doc.core.annotation.AuthMan;
import com.zyplayer.doc.core.json.DocResponseJson;
import com.zyplayer.doc.core.json.ResponseJson;
@@ -105,11 +106,11 @@ public class WikiPageFileController {
Map<String, Object> resultMap = new HashMap<>();
DocResponseJson docResponseJson = this.uploadFile(wikiPageFile, file);
if (!docResponseJson.isOk()) {
resultMap.put("errno", "1");
resultMap.put("err", docResponseJson.getErrMsg());
resultMap.put("errno", 1);
resultMap.put("message", docResponseJson.getErrMsg());
} else {
resultMap.put("errno", "0");
resultMap.put("data", new String[]{wikiPageFile.getFileUrl()});
resultMap.put("errno", 0);
resultMap.put("data", new JSONObject().fluentPut("url", wikiPageFile.getFileUrl()));
}
return resultMap;
}