fix(desktop): wire serializeJsonBody into OAuth request path
The salvaged helper exported serializeJsonBody but main.cjs still inline-built the request body, leaving the export dead and the test decoupled from the real path. Use it at the fetchJsonViaOauthSession site so the helper's coverage exercises production body construction. Byte-identical output.
This commit is contained in:
@@ -3468,7 +3468,7 @@ function fetchJsonViaOauthSession(url, options = {}) {
|
||||
reject(new Error(`Unsupported Hermes backend URL protocol: ${parsed.protocol}`))
|
||||
return
|
||||
}
|
||||
const body = options.body === undefined ? undefined : Buffer.from(JSON.stringify(options.body))
|
||||
const body = serializeJsonBody(options.body)
|
||||
const timeoutMs = resolveTimeoutMs(options.timeoutMs, DEFAULT_FETCH_TIMEOUT_MS)
|
||||
|
||||
const request = electronNet.request({
|
||||
|
||||
Reference in New Issue
Block a user