1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 13:24:52 +00:00

wiki page saved in doc uuid dir (#6110)

* wiki page saved in doc uuid dir

* optimize del page and dir

* optimize code

* rebase
This commit is contained in:
JoinTyang
2024-05-27 17:19:58 +08:00
committed by GitHub
parent 69011567a3
commit dc0c220364
9 changed files with 238 additions and 90 deletions

View File

@@ -83,14 +83,7 @@ class Wiki extends Component {
getWikiConfig = () => {
wikiAPI.getWiki2Config(wikiId).then(res => {
const { wiki_config, repo_id } = res.data.wiki;
try {
JSON.parse(wiki_config);
} catch (error) {
toaster.danger(gettext('Wiki config error'));
this.setState({ isConfigLoading: false });
return;
}
const config = new WikiConfig(JSON.parse(wiki_config) || {});
const config = new WikiConfig(wiki_config || {});
this.setState({
config,
isConfigLoading: false,