Skip to content

Commit

Permalink
Fix server crashing bugs from scope issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jmicko committed Jan 4, 2024
1 parent a763875 commit 3cace15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/routes/orders.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,10 @@ router.put('/bulkPairRatio/:product_id', rejectUnauthenticated, async (req, res)
*/
router.delete('/', rejectUnauthenticated, async (req, res) => {
devLog('in delete all orders route');
const userID = req.user.id;
const previousPauseStatus = req.user.paused;
try {
const identifier = req.headers['x-identifier'];
const userID = req.user.id;
const previousPauseStatus = req.user.paused;
devLog('in delete all orders route', userID);
// pause trading before cancelling all orders or it will reorder them before done, making it take longer
await databaseClient.setPause(true, userID)
Expand Down Expand Up @@ -658,8 +658,8 @@ router.delete('/product/:product_id', rejectUnauthenticated, async (req, res) =>
*/
router.delete('/:product_id/:start/:end', rejectUnauthenticated, async (req, res) => {
// devLog('in delete range route');
devLog('in delete range route', userID, start, end);
const userID = req.user.id;
devLog('in delete range route', userID);
const previousPauseStatus = req.user.paused;
try {
const identifier = req.headers['x-identifier'];
Expand Down

0 comments on commit 3cace15

Please sign in to comment.