Skip to content

Commit 9dd0261

Browse files
authored
Merge pull request #595 from appirio-tech/feature/increase_timeout_create_topic
Github issue #593, Increase timeout when posting topics / comments to message service
2 parents cbc36c5 + 702ac00 commit 9dd0261

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/messages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function getTopicPosts(topicId, postIds) {
4545
}
4646

4747
export function createTopic(topicProps) {
48-
return axios.post(`${TC_API_URL}/v4/topics/`, topicProps)
48+
return axios.post(`${TC_API_URL}/v4/topics/`, topicProps, { timeout: 1.5 * 60 * 1000 })
4949
.then( resp => {
5050
return _.get(resp.data, 'result.content', {})
5151
})
@@ -54,7 +54,7 @@ export function createTopic(topicProps) {
5454
// ignore resp
5555
/*eslint-disable no-unused-vars */
5656
export function addTopicPost(topicId, post) {
57-
return axios.post(`${TC_API_URL}/v4/topics/${topicId}/posts`, { post: post.content } )
57+
return axios.post(`${TC_API_URL}/v4/topics/${topicId}/posts`, { post: post.content }, { timeout: 1.5 * 60 * 1000 } )
5858
.then( resp => {
5959
return {
6060
topicId,

0 commit comments

Comments
 (0)