diff options
| author | Adam Soltys <[email protected]> | 2024-11-21 22:57:03 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-21 22:57:03 -0800 |
| commit | f041c7fa846fb80d920b00b20aeba4925865cc68 (patch) | |
| tree | 8bdd2b659810e15c8814065a16d903d86a18daa5 | |
| parent | f0ef70adc613c85f58ccc679f3a4d2d3b2d09e71 (diff) | |
| download | coinos-server-f041c7fa846fb80d920b00b20aeba4925865cc68.tar.gz coinos-server-f041c7fa846fb80d920b00b20aeba4925865cc68.zip | |
return pidcashreq
| -rw-r--r-- | routes/ecash.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/routes/ecash.ts b/routes/ecash.ts index 35d9f950..6aac01a8 100644 --- a/routes/ecash.ts +++ b/routes/ecash.ts @@ -16,10 +16,11 @@ const sendCash = async ({ amount, user }) => { const p = await debit({ hash, amount, user, type }); const token = await mint(parseInt(amount)); p.memo = id; - await s(`payment:${p.id}`, p); + const { id: pid } = p; + await s(`payment:${pid}`, p); s(`cash:${id}`, token); - return { id, token }; + return { id, token, pid }; }; export default { @@ -39,10 +40,10 @@ export default { async get(req, res) { const { - params: { id, version }, + params: { id }, } = req; try { - const token = await get(id, version); + const token = await get(id); const status = await check(token); res.send({ token, status }); } catch (e) { |
