aboutsummaryrefslogtreecommitdiffstats
path: root/routes/swaps.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-05 21:08:53 -0700
committerAdam Soltys <[email protected]>2022-09-05 21:08:53 -0700
commit8a82c69419dc358fbaeab322c32d18ee84656feb (patch)
treedf71a4f11a16d241a38c30e6841fe199725bc7fb /routes/swaps.js
parenta3bcd415de65a6ae14ea451d7d1c8f3f136e99d4 (diff)
downloadcoinos-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.js10
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);
}
})
);