@fy-/fws-vue 2.3.59 → 2.3.61

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.
@@ -136,18 +136,19 @@ params?: RestParams,
136
136
 
137
137
  // Create the actual request function
138
138
  const performRequest = async (): Promise<ResultType> => {
139
- const headers: { [key: string]: string } = {}
139
+ const h: { [key: string]: string } = {}
140
140
  const timestamp = Date.now()
141
141
 
142
142
  if (secret && secret !== '') {
143
143
  const signature = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(`${method}${url}${timestamp}${secret}`),
144
144
  )
145
- headers['X-Timestamp'] = timestamp.toString()
146
- headers['X-Signature'] = btoa(String.fromCharCode(...new Uint8Array(signature)))
145
+ h['X-Timestamp'] = timestamp.toString()
146
+ h['X-Signature'] = btoa(String.fromCharCode(...new Uint8Array(signature)))
147
+ console.debug('Using secret for request signature:', `${method}${url}${timestamp}${secret}`)
147
148
  }
148
149
 
149
150
  try {
150
- const restResult: ResultType = await rest(url, method, params)
151
+ const restResult: ResultType = await rest(url, method, params, h)
151
152
 
152
153
  // Store result in server router if in SSR mode
153
154
  if (checkSSRMode()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.3.59",
3
+ "version": "2.3.61",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",