1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 03:47:09 +00:00

Merge pull request #3075 from haiwen/update-publish-draft

update draft
This commit is contained in:
陈钦亮
2019-03-07 16:57:21 +08:00
committed by GitHub
4 changed files with 8 additions and 4 deletions

View File

@@ -378,8 +378,8 @@ class Draft extends React.Component {
}
onPublishDraft = () => {
const OriginFileLink = siteRoot + 'lib/' + draftRepoID + '/file' + draftOriginFilePath + '/';
seafileAPI.publishDraft(draftID).then(res => {
const OriginFileLink = siteRoot + 'lib/' + draftRepoID + '/file' + encodeURIComponent(res.data.published_file_path) + '/';
window.location.href = OriginFileLink;
});
}

View File

@@ -230,7 +230,7 @@ class EditorUtilities {
publishDraftFile() {
return seafileAPI.publishDraft(draftID).then(res => {
window.location.href = serviceUrl + '/lib/' + repoID + '/file' + encodeURIComponent(draftOriginFilePath);
window.location.href = serviceUrl + '/lib/' + repoID + '/file' + encodeURIComponent(res.data.published_file_path);
});
}