瀏覽代碼

Uses the wrapped fetch from base/util.

master
damencho 6 年之前
父節點
當前提交
75ab890707
共有 1 個檔案被更改,包括 3 行新增9 行删除
  1. 3
    9
      react/features/invite/components/dial-in-summary/web/DialInSummary.js

+ 3
- 9
react/features/invite/components/dial-in-summary/web/DialInSummary.js 查看文件

@@ -3,6 +3,7 @@
3 3
 import React, { Component } from 'react';
4 4
 
5 5
 import { translate } from '../../../../base/i18n';
6
+import { doGetJSON } from '../../../../base/util';
6 7
 
7 8
 import ConferenceID from './ConferenceID';
8 9
 import NumbersList from './NumbersList';
@@ -176,11 +177,7 @@ class DialInSummary extends Component<Props, State> {
176 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 181
             .catch(() => Promise.reject(this.props.t('info.genericError')));
185 182
     }
186 183
 
@@ -206,11 +203,8 @@ class DialInSummary extends Component<Props, State> {
206 203
         if (room && mucURL) {
207 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 208
             .catch(() => Promise.reject(this.props.t('info.genericError')));
215 209
     }
216 210
 

Loading…
取消
儲存