This commit is contained in:
Benjamin Toby
2025-05-21 09:34:49 +01:00
parent 4adb5af430
commit 0fc2c7fb3e
8 changed files with 36 additions and 11 deletions
+3 -2
View File
@@ -30,7 +30,8 @@ export type ApiGetParams = Param;
* # Make a get request to Datasquirel API
*/
export default async function get<
T extends { [k: string]: any } = { [k: string]: any }
T extends { [k: string]: any } = { [k: string]: any },
R extends any = any
>({
key,
db,
@@ -40,7 +41,7 @@ export default async function get<
user_id,
debug,
forceLocal,
}: Param<T>): Promise<GetReturn> {
}: Param<T>): Promise<GetReturn<R>> {
const grabedHostNames = grabHostNames();
const { host, port, scheme } = grabedHostNames;