diff options
| author | Adam Soltys <[email protected]> | 2025-01-19 23:49:20 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-01-19 23:49:20 -0800 |
| commit | a55eb812c4ea6dc9573f2bdf40f058a1d3ba90ee (patch) | |
| tree | 65db4ef24269861b2f8aa1905c49b113c04ffdf2 | |
| parent | bdf81e9234e11c7da63ab442806b800eee212727 (diff) | |
| download | coinos-server-a55eb812c4ea6dc9573f2bdf40f058a1d3ba90ee.tar.gz coinos-server-a55eb812c4ea6dc9573f2bdf40f058a1d3ba90ee.zip | |
return public fields only
| -rw-r--r-- | routes/payments.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routes/payments.ts b/routes/payments.ts index 75d667f2..1ff0be05 100644 --- a/routes/payments.ts +++ b/routes/payments.ts @@ -20,6 +20,7 @@ import { SATS, bail, fail, + fields, getInvoice, getPayment, getUser, @@ -115,7 +116,7 @@ export default { return p; } if (p.created < start || p.created > end) return; - if (p.type === types.internal) p.with = await g(`user:${p.ref}`); + if (p.type === types.internal) p.with = await getUser(p.ref, fields); return p; }), ) @@ -164,7 +165,7 @@ export default { params: { hash }, } = req; const p = await getPayment(hash); - if (p?.type === types.internal) p.with = await g(`user:${p.ref}`); + if (p?.type === types.internal) p.with = await getUser(p.ref, fields); res.send(p); } catch (e) { console.log(e); |
