|
@@ -74,11 +74,11 @@ class HtmlDocument extends React.Component {
|
74
|
74
|
}
|
75
|
75
|
|
76
|
76
|
loadContent = async () => {
|
77
|
|
- const { content, config } = this.state
|
|
77
|
+ const { loggedUser, content, config } = this.state
|
78
|
78
|
|
79
|
|
- const fetchResultHtmlDocument = getHtmlDocContent(config.apiUrl, content.workspace_id, content.content_id)
|
80
|
|
- const fetchResultComment = getHtmlDocComment(config.apiUrl, content.workspace_id, content.content_id)
|
81
|
|
- const fetchResultRevision = getHtmlDocRevision(config.apiUrl, content.workspace_id, content.content_id)
|
|
79
|
+ const fetchResultHtmlDocument = getHtmlDocContent(loggedUser, config.apiUrl, content.workspace_id, content.content_id)
|
|
80
|
+ const fetchResultComment = getHtmlDocComment(loggedUser, config.apiUrl, content.workspace_id, content.content_id)
|
|
81
|
+ const fetchResultRevision = getHtmlDocRevision(loggedUser, config.apiUrl, content.workspace_id, content.content_id)
|
82
|
82
|
|
83
|
83
|
handleFetchResult(await fetchResultHtmlDocument)
|
84
|
84
|
.then(resHtmlDocument => this.setState({content: resHtmlDocument.body}))
|
|
@@ -126,9 +126,9 @@ class HtmlDocument extends React.Component {
|
126
|
126
|
}
|
127
|
127
|
|
128
|
128
|
handleSaveEditTitle = async newTitle => {
|
129
|
|
- const { config, content } = this.state
|
|
129
|
+ const { loggedUser, config, content } = this.state
|
130
|
130
|
|
131
|
|
- const fetchResultSaveHtmlDoc = putHtmlDocContent(config.apiUrl, content.workspace_id, content.content_id, newTitle, content.raw_content)
|
|
131
|
+ const fetchResultSaveHtmlDoc = putHtmlDocContent(loggedUser, config.apiUrl, content.workspace_id, content.content_id, newTitle, content.raw_content)
|
132
|
132
|
|
133
|
133
|
handleFetchResult(await fetchResultSaveHtmlDoc)
|
134
|
134
|
.then(resSave => {
|
|
@@ -145,9 +145,9 @@ class HtmlDocument extends React.Component {
|
145
|
145
|
}
|
146
|
146
|
|
147
|
147
|
handleSaveHtmlDocument = async () => {
|
148
|
|
- const { content, config } = this.state
|
|
148
|
+ const { loggedUser, content, config } = this.state
|
149
|
149
|
|
150
|
|
- const fetchResultSaveHtmlDoc = putHtmlDocContent(config.apiUrl, content.workspace_id, content.content_id, content.label, content.raw_content)
|
|
150
|
+ const fetchResultSaveHtmlDoc = putHtmlDocContent(loggedUser, config.apiUrl, content.workspace_id, content.content_id, content.label, content.raw_content)
|
151
|
151
|
|
152
|
152
|
handleFetchResult(await fetchResultSaveHtmlDoc)
|
153
|
153
|
.then(resSave => {
|
|
@@ -171,9 +171,9 @@ class HtmlDocument extends React.Component {
|
171
|
171
|
}
|
172
|
172
|
|
173
|
173
|
handleClickValidateNewCommentBtn = async () => {
|
174
|
|
- const { config, content, newComment } = this.state
|
|
174
|
+ const { loggedUser, config, content, newComment } = this.state
|
175
|
175
|
|
176
|
|
- const fetchResultSaveNewComment = await postHtmlDocNewComment(config.apiUrl, content.workspace_id, content.content_id, newComment)
|
|
176
|
+ const fetchResultSaveNewComment = await postHtmlDocNewComment(loggedUser, config.apiUrl, content.workspace_id, content.content_id, newComment)
|
177
|
177
|
|
178
|
178
|
handleFetchResult(await fetchResultSaveNewComment)
|
179
|
179
|
.then(resSave => {
|
|
@@ -190,9 +190,9 @@ class HtmlDocument extends React.Component {
|
190
|
190
|
handleToggleWysiwyg = () => this.setState(prev => ({timelineWysiwyg: !prev.timelineWysiwyg}))
|
191
|
191
|
|
192
|
192
|
handleChangeStatus = async newStatus => {
|
193
|
|
- const { config, content } = this.state
|
|
193
|
+ const { loggedUser, config, content } = this.state
|
194
|
194
|
|
195
|
|
- const fetchResultSaveEditStatus = putHtmlDocStatus(config.apiUrl, content.workspace_id, content.content_id, newStatus)
|
|
195
|
+ const fetchResultSaveEditStatus = putHtmlDocStatus(loggedUser, config.apiUrl, content.workspace_id, content.content_id, newStatus)
|
196
|
196
|
|
197
|
197
|
handleFetchResult(await fetchResultSaveEditStatus)
|
198
|
198
|
.then(resSave => {
|