Remove all 'useLocal' params

This commit is contained in:
Benjamin Toby
2025-01-20 09:12:43 +01:00
parent 16191975f9
commit 7d0f3e12f3
113 changed files with 164 additions and 425 deletions
+1 -2
View File
@@ -18,7 +18,6 @@ type Param<T extends {
query: string | ApiGetQueryObject<T>;
queryValues?: string[];
tableName?: string;
useLocal?: boolean;
user_id?: string | number;
debug?: boolean;
};
@@ -30,5 +29,5 @@ export default function get<T extends {
[k: string]: any;
} = {
[k: string]: any;
}>({ key, db, query, queryValues, tableName, useLocal, user_id, debug, }: Param<T>): Promise<GetReturn>;
}>({ key, db, query, queryValues, tableName, user_id, debug, }: Param<T>): Promise<GetReturn>;
export {};
+2 -3
View File
@@ -23,7 +23,7 @@ const grab_query_and_values_1 = __importDefault(require("./(utils)/grab-query-an
* # Make a get request to Datasquirel API
*/
function get(_a) {
return __awaiter(this, arguments, void 0, function* ({ key, db, query, queryValues, tableName, useLocal, user_id, debug, }) {
return __awaiter(this, arguments, void 0, function* ({ key, db, query, queryValues, tableName, user_id, debug, }) {
const grabedHostNames = (0, grab_host_names_1.default)();
const { host, port, scheme } = grabedHostNames;
/**
@@ -36,7 +36,7 @@ function get(_a) {
(DSQL_DB_USERNAME === null || DSQL_DB_USERNAME === void 0 ? void 0 : DSQL_DB_USERNAME.match(/./)) &&
(DSQL_DB_PASSWORD === null || DSQL_DB_PASSWORD === void 0 ? void 0 : DSQL_DB_PASSWORD.match(/./)) &&
(DSQL_DB_NAME === null || DSQL_DB_NAME === void 0 ? void 0 : DSQL_DB_NAME.match(/./)) &&
useLocal) {
global.DSQL_USE_LOCAL) {
let dbSchema;
try {
const localDbSchemaPath = path_1.default.resolve(process.cwd(), "dsql.schema.json");
@@ -52,7 +52,6 @@ function get(_a) {
queryValues,
tableName,
dbSchema,
useLocal,
debug,
});
}