diff options
| author | Adam Soltys <[email protected]> | 2022-09-05 21:08:53 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-05 21:08:53 -0700 |
| commit | 8a82c69419dc358fbaeab322c32d18ee84656feb (patch) | |
| tree | df71a4f11a16d241a38c30e6841fe199725bc7fb /routes/swaps.js | |
| parent | a3bcd415de65a6ae14ea451d7d1c8f3f136e99d4 (diff) | |
| download | coinos-server-8a82c69419dc358fbaeab322c32d18ee84656feb.tar.gz coinos-server-8a82c69419dc358fbaeab322c32d18ee84656feb.zip | |
missing imports and fastify err responses
Diffstat (limited to 'routes/swaps.js')
| -rw-r--r-- | routes/swaps.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routes/swaps.js b/routes/swaps.js index 9f7cfcbf..b37708d6 100644 --- a/routes/swaps.js +++ b/routes/swaps.js @@ -340,7 +340,7 @@ app.delete( const { user } = req; await cancel(user, id); - res.end(); + res.send({}); }) ); @@ -348,14 +348,14 @@ app.post( "/orders", auth, async (req, res) => { - return res.status(500).send("Trading temporarily disabled"); + return res.code(500).send("Trading temporarily disabled"); const { user } = req; try { await swap(user, req.body); - res.end(); + res.send({}); } catch (e) { err(req.user.username, e.message); - res.status(500).send(e.message); + res.code(500).send(e.message); } }) ); @@ -393,7 +393,7 @@ app.get( }) ); } catch (e) { - res.status(500).send(e.message); + res.code(500).send(e.message); } }) ); |
