Updates
This commit is contained in:
+4
-1
@@ -6,8 +6,11 @@ type GrabHostNamesReturn = {
|
||||
scheme: typeof http | typeof https;
|
||||
user_id: string | number;
|
||||
};
|
||||
type Param = {
|
||||
userId?: string | number;
|
||||
};
|
||||
/**
|
||||
* # Grab Names For Query
|
||||
*/
|
||||
export default function grabHostNames(): GrabHostNamesReturn;
|
||||
export default function grabHostNames(param?: Param): GrabHostNamesReturn;
|
||||
export {};
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ const http_1 = __importDefault(require("http"));
|
||||
/**
|
||||
* # Grab Names For Query
|
||||
*/
|
||||
function grabHostNames() {
|
||||
function grabHostNames(param) {
|
||||
var _a, _b;
|
||||
const scheme = process.env.DSQL_HTTP_SCHEME;
|
||||
const localHost = process.env.DSQL_LOCAL_HOST;
|
||||
@@ -25,6 +25,6 @@ function grabHostNames() {
|
||||
host: remoteHost || localHost || "datasquirel.com",
|
||||
port: remoteHostPort || localHostPort || 443,
|
||||
scheme: (scheme === null || scheme === void 0 ? void 0 : scheme.match(/^http$/i)) ? http_1.default : https_1.default,
|
||||
user_id: String(process.env.DSQL_API_USER_ID || 0),
|
||||
user_id: (param === null || param === void 0 ? void 0 : param.userId) || String(process.env.DSQL_API_USER_ID || 0),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user