Remove all 'useLocal' params
This commit is contained in:
+1
-4
@@ -26,7 +26,6 @@ type Param<T extends { [k: string]: any } = { [k: string]: any }> = {
|
||||
query: string | ApiGetQueryObject<T>;
|
||||
queryValues?: string[];
|
||||
tableName?: string;
|
||||
useLocal?: boolean;
|
||||
user_id?: string | number;
|
||||
debug?: boolean;
|
||||
};
|
||||
@@ -44,7 +43,6 @@ export default async function get<
|
||||
query,
|
||||
queryValues,
|
||||
tableName,
|
||||
useLocal,
|
||||
user_id,
|
||||
debug,
|
||||
}: Param<T>): Promise<GetReturn> {
|
||||
@@ -64,7 +62,7 @@ export default async function get<
|
||||
DSQL_DB_USERNAME?.match(/./) &&
|
||||
DSQL_DB_PASSWORD?.match(/./) &&
|
||||
DSQL_DB_NAME?.match(/./) &&
|
||||
useLocal
|
||||
global.DSQL_USE_LOCAL
|
||||
) {
|
||||
let dbSchema: DSQL_DatabaseSchemaType | undefined;
|
||||
|
||||
@@ -86,7 +84,6 @@ export default async function get<
|
||||
queryValues,
|
||||
tableName,
|
||||
dbSchema,
|
||||
useLocal,
|
||||
debug,
|
||||
});
|
||||
}
|
||||
|
||||
+1
-4
@@ -12,7 +12,6 @@ type Param = {
|
||||
query: string | PostDataPayload;
|
||||
queryValues?: any[];
|
||||
tableName?: string;
|
||||
useLocal?: boolean;
|
||||
user_id?: boolean;
|
||||
};
|
||||
|
||||
@@ -25,7 +24,6 @@ export default async function post({
|
||||
queryValues,
|
||||
database,
|
||||
tableName,
|
||||
useLocal,
|
||||
user_id,
|
||||
}: Param): Promise<PostReturn> {
|
||||
const grabedHostNames = grabHostNames();
|
||||
@@ -44,7 +42,7 @@ export default async function post({
|
||||
DSQL_DB_USERNAME?.match(/./) &&
|
||||
DSQL_DB_PASSWORD?.match(/./) &&
|
||||
DSQL_DB_NAME?.match(/./) &&
|
||||
useLocal
|
||||
global.DSQL_USE_LOCAL
|
||||
) {
|
||||
/** @type {import("../package-shared/types").DSQL_DatabaseSchemaType | undefined} */
|
||||
let dbSchema:
|
||||
@@ -65,7 +63,6 @@ export default async function post({
|
||||
dbSchema,
|
||||
queryValues,
|
||||
tableName,
|
||||
useLocal,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user