This commit is contained in:
Benjamin Toby
2025-02-12 12:39:02 +01:00
parent 12296a3e75
commit b578843c6d
33 changed files with 112 additions and 39 deletions
+3
View File
@@ -20,6 +20,7 @@ type Param<T extends { [k: string]: any } = { [k: string]: any }> = {
tableName?: string;
user_id?: string | number;
debug?: boolean;
forceLocal?: boolean;
};
export type ApiGetParams = Param;
@@ -37,6 +38,7 @@ export default async function get<
tableName,
user_id,
debug,
forceLocal,
}: Param<T>): Promise<GetReturn> {
const grabedHostNames = grabHostNames();
const { host, port, scheme } = grabedHostNames;
@@ -70,6 +72,7 @@ export default async function get<
tableName,
dbSchema,
debug,
forceLocal,
});
}
+3
View File
@@ -13,6 +13,7 @@ type Param = {
queryValues?: any[];
tableName?: string;
user_id?: boolean;
forceLocal?: boolean;
};
/**
@@ -25,6 +26,7 @@ export default async function post({
database,
tableName,
user_id,
forceLocal,
}: Param): Promise<PostReturn> {
const grabedHostNames = grabHostNames();
const { host, port, scheme } = grabedHostNames;
@@ -61,6 +63,7 @@ export default async function post({
dbSchema,
queryValues,
tableName,
forceLocal,
});
}