Browse Source

added mockapiurl config

Skylsmoi 6 years ago
parent
commit
6cce254a69
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/container/Thread.jsx

+ 3 - 2
src/container/Thread.jsx View File

24
     icon: 'fa fa-comments-o',
24
     icon: 'fa fa-comments-o',
25
     color: '#65c7f2',
25
     color: '#65c7f2',
26
     domContainer: 'appContainer',
26
     domContainer: 'appContainer',
27
-    apiUrl: 'http://localhost:3001'
27
+    apiUrl: 'http://localhost:3001',
28
+    mockApiUrl: 'http://localhost:3001'
28
   },
29
   },
29
   loggedUser: {
30
   loggedUser: {
30
     id: 5,
31
     id: 5,
78
     const { content, config } = this.state
79
     const { content, config } = this.state
79
     if (content.id === '-1') return // debug case
80
     if (content.id === '-1') return // debug case
80
 
81
 
81
-    const fetchResultThread = await fetch(`${config.apiUrl}/workspace/${content.workspace.id}/content/${content.id}`, {
82
+    const fetchResultThread = await fetch(`${config.mockApiUrl}/workspace/${content.workspace.id}/content/${content.id}`, {
82
       ...FETCH_CONFIG,
83
       ...FETCH_CONFIG,
83
       method: 'GET'
84
       method: 'GET'
84
     })
85
     })