소스 검색

added mockapiurl config

Skylsmoi 6 년 전
부모
커밋
6cce254a69
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/container/Thread.jsx

+ 3 - 2
src/container/Thread.jsx 파일 보기

@@ -24,7 +24,8 @@ const debug = {
24 24
     icon: 'fa fa-comments-o',
25 25
     color: '#65c7f2',
26 26
     domContainer: 'appContainer',
27
-    apiUrl: 'http://localhost:3001'
27
+    apiUrl: 'http://localhost:3001',
28
+    mockApiUrl: 'http://localhost:3001'
28 29
   },
29 30
   loggedUser: {
30 31
     id: 5,
@@ -78,7 +79,7 @@ class Thread extends React.Component {
78 79
     const { content, config } = this.state
79 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 83
       ...FETCH_CONFIG,
83 84
       method: 'GET'
84 85
     })