Browse Source

Uses the wrapped fetch from base/util.

master
damencho 6 years ago
parent
commit
75ab890707

+ 3
- 9
react/features/invite/components/dial-in-summary/web/DialInSummary.js View File

3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 
4
 
5
 import { translate } from '../../../../base/i18n';
5
 import { translate } from '../../../../base/i18n';
6
+import { doGetJSON } from '../../../../base/util';
6
 
7
 
7
 import ConferenceID from './ConferenceID';
8
 import ConferenceID from './ConferenceID';
8
 import NumbersList from './NumbersList';
9
 import NumbersList from './NumbersList';
176
             return Promise.resolve();
177
             return Promise.resolve();
177
         }
178
         }
178
 
179
 
179
-        const conferenceIDURL
180
-            = `${dialInConfCodeUrl}?conference=${room}@${mucURL}`;
181
-
182
-        return fetch(conferenceIDURL)
183
-            .then(response => response.json())
180
+        return doGetJSON(`${dialInConfCodeUrl}?conference=${room}@${mucURL}`)
184
             .catch(() => Promise.reject(this.props.t('info.genericError')));
181
             .catch(() => Promise.reject(this.props.t('info.genericError')));
185
     }
182
     }
186
 
183
 
206
         if (room && mucURL) {
203
         if (room && mucURL) {
207
             URLSuffix = `?conference=${room}@${mucURL}`;
204
             URLSuffix = `?conference=${room}@${mucURL}`;
208
         }
205
         }
209
-        const conferenceIDURL
210
-        = `${dialInNumbersUrl}${URLSuffix}`;
211
 
206
 
212
-        return fetch(conferenceIDURL)
213
-            .then(response => response.json())
207
+        return doGetJSON(`${dialInNumbersUrl}${URLSuffix}`)
214
             .catch(() => Promise.reject(this.props.t('info.genericError')));
208
             .catch(() => Promise.reject(this.props.t('info.genericError')));
215
     }
209
     }
216
 
210
 

Loading…
Cancel
Save