videomail-client 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/js/resource.js
CHANGED
|
@@ -3,6 +3,7 @@ import superagent from 'superagent'
|
|
|
3
3
|
import Constants from './constants'
|
|
4
4
|
|
|
5
5
|
const CACHE_KEY = 'alias'
|
|
6
|
+
const timezoneId = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
6
7
|
|
|
7
8
|
export default function (options) {
|
|
8
9
|
const cache = {}
|
|
@@ -40,12 +41,10 @@ export default function (options) {
|
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
function fetch(alias, cb) {
|
|
43
|
-
const timezoneId = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
44
|
-
|
|
45
44
|
superagent
|
|
46
45
|
.get('/videomail/' + alias + '/snapshot')
|
|
47
46
|
.set('Accept', 'application/json')
|
|
48
|
-
.set('
|
|
47
|
+
.set('Timezone-Id', timezoneId)
|
|
49
48
|
.set(Constants.SITE_NAME_LABEL, options.siteName)
|
|
50
49
|
.timeout(options.timeouts.connection)
|
|
51
50
|
.end(function (err, res) {
|
|
@@ -85,6 +84,7 @@ export default function (options) {
|
|
|
85
84
|
|
|
86
85
|
request
|
|
87
86
|
.query(queryParams)
|
|
87
|
+
.set('Timezone-Id', timezoneId)
|
|
88
88
|
.send(videomail)
|
|
89
89
|
.timeout(options.timeout)
|
|
90
90
|
.end(function (err, res) {
|
|
@@ -185,6 +185,7 @@ export default function (options) {
|
|
|
185
185
|
superagent
|
|
186
186
|
.post(url)
|
|
187
187
|
.type(formType)
|
|
188
|
+
.set('Timezone-Id', timezoneId)
|
|
188
189
|
.send(formData)
|
|
189
190
|
.timeout(options.timeout)
|
|
190
191
|
.end(function (err, res) {
|