aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-01-22 18:48:07 -0800
committerAdam Soltys <[email protected]>2026-01-22 18:48:07 -0800
commitd147e04d1b52f1359507a6f9d88e0227cf6bb250 (patch)
tree2eb562735a335831cec4737610f9638aaf50f32f /lib/utils.ts
parent0edd59be4bbfc62f73b972e4992ec3c31d6baab1 (diff)
downloadcoinos-server-d147e04d1b52f1359507a6f9d88e0227cf6bb250.tar.gz
coinos-server-d147e04d1b52f1359507a6f9d88e0227cf6bb250.zip
read payments from archive
Diffstat (limited to 'lib/utils.ts')
-rw-r--r--lib/utils.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/utils.ts b/lib/utils.ts
index 018dc92e..add09782 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -1,5 +1,5 @@
import config from "$config";
-import { g } from "$lib/db";
+import { g, gf } from "$lib/db";
import locales from "$lib/locales/index";
const { URL } = process.env;
@@ -57,15 +57,15 @@ export const getUser = async (username, fields = undefined) => {
};
export const getInvoice = async (hash) => {
- let iid = await g(`invoice:${hash}`);
+ let iid = await gf(`invoice:${hash}`);
if (iid?.id) iid = iid.id;
else if (iid?.hash) iid = iid.hash;
- return await g(`invoice:${iid}`);
+ return await gf(`invoice:${iid}`);
};
export const getPayment = async (id) => {
- let p = await g(`payment:${id}`);
- if (typeof p === "string") p = await g(`payment:${p}`);
+ let p = await gf(`payment:${id}`);
+ if (typeof p === "string") p = await gf(`payment:${p}`);
return p;
};