Cleanup: remove unused redactParams helper
This commit is contained in:
parent
d903aae255
commit
09e507d723
1 changed files with 0 additions and 8 deletions
|
|
@ -18,14 +18,6 @@ export class OscarApiError extends Error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function redactParams(params) {
|
|
||||||
const redacted = { ...params };
|
|
||||||
for (const key of ['a', 'password', 'pwd', 'pass']) {
|
|
||||||
if (key in redacted) redacted[key] = '[redacted]';
|
|
||||||
}
|
|
||||||
return redacted;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Call a Web API endpoint and unwrap the { response: { statusCode, statusText, data } } envelope.
|
// Call a Web API endpoint and unwrap the { response: { statusCode, statusText, data } } envelope.
|
||||||
async function call(path, params = {}, { base = WEBAPI_BASE, method = 'GET', formBody = null, timeoutMs = 15000 } = {}) {
|
async function call(path, params = {}, { base = WEBAPI_BASE, method = 'GET', formBody = null, timeoutMs = 15000 } = {}) {
|
||||||
const url = new URL(path, base);
|
const url = new URL(path, base);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue