Sfoglia il codice sorgente

added mockapiurl config

Skylsmoi 6 anni fa
parent
commit
9e7ca8210e
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      src/container/PageHtml.jsx

+ 3 - 3
src/container/PageHtml.jsx Vedi File

@@ -25,7 +25,7 @@ const debug = {
25 25
     icon: 'fa fa-file-text-o',
26 26
     color: '#fdfdfd',
27 27
     domContainer: 'appContainer',
28
-    apiUrl: 'http://localhost:3001'
28
+    mockApiUrl: 'http://localhost:3001'
29 29
   },
30 30
   loggedUser: {
31 31
     id: 5,
@@ -82,11 +82,11 @@ class pageHtml extends React.Component {
82 82
     const { content, config } = this.state
83 83
     if (content.id === '-1') return // debug case
84 84
 
85
-    const fetchResultPageHtml = await fetch(`${config.apiUrl}/workspace/${content.workspace.id}/content/${content.id}`, {
85
+    const fetchResultPageHtml = await fetch(`${config.mockApiUrl}/workspace/${content.workspace.id}/content/${content.id}`, {
86 86
       ...FETCH_CONFIG,
87 87
       method: 'GET'
88 88
     })
89
-    const fetchResultTimeline = await fetch(`${config.apiUrl}/workspace/${content.workspace.id}/content/${content.id}/timeline`, {
89
+    const fetchResultTimeline = await fetch(`${config.mockApiUrl}/workspace/${content.workspace.id}/content/${content.id}/timeline`, {
90 90
       ...FETCH_CONFIG,
91 91
       method: 'GET'
92 92
     })