Bugfix
This commit is contained in:
parent
14330465b9
commit
dfbd4c3557
25
utils/get.js
25
utils/get.js
@ -104,18 +104,23 @@ async function get({ key, db, query, queryValues, tableName }) {
|
||||
}`;
|
||||
}
|
||||
|
||||
/** @type {https.RequestOptions} */
|
||||
const requestObject = {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: key,
|
||||
},
|
||||
port: localHostPort || 443,
|
||||
hostname: localHost || "datasquirel.com",
|
||||
path: encodeURIComponent(path),
|
||||
};
|
||||
|
||||
console.log("requestObject =>", requestObject);
|
||||
|
||||
(scheme?.match(/^http$/i) ? http : https)
|
||||
.request(
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: key,
|
||||
},
|
||||
port: localHostPort || 443,
|
||||
hostname: localHost || "datasquirel.com",
|
||||
path: encodeURIComponent(path),
|
||||
},
|
||||
requestObject,
|
||||
|
||||
/**
|
||||
* Callback Function
|
||||
|
Loading…
Reference in New Issue
Block a user