Skip to content

Commit

Permalink
Merge pull request #122 from Synthetixio/fix
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
noisekit authored Dec 6, 2024
2 parents 69b5498 + 1e82e0a commit 996739f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ redisClient.on('ready', () => {
const v3MainnetScPoolAPYAllRouter = require('./routes/v3/mainnet/sc-pool-apy-all.js');
app.use('/v3/mainnet/sc-pool-apy-all', v3MainnetScPoolAPYAllRouter);

const v3SnaxTestnetVotesRouter = require('./routes/v3/snax-testnet/votes.js');
app.use('/v3/snax-testnet/votes', v3SnaxTestnetVotesRouter);
// const v3SnaxTestnetVotesRouter = require('./routes/v3/snax-testnet/votes.js');
// app.use('/v3/snax-testnet/votes', v3SnaxTestnetVotesRouter);

const v3SnaxVotesRouter = require('./routes/v3/snax/votes.js');
app.use('/v3/snax/votes', v3SnaxVotesRouter);
Expand All @@ -142,6 +142,15 @@ redisClient.on('ready', () => {
const statsPerpsVolumeRouter = require('./routes/stats/perps-volume.js');
app.use('/stats/perps-volume', statsPerpsVolumeRouter);

app.use(function errorHandler(err, req, res, next) {
console.error(err);
if (res.headersSent) {
return next(err);
}
res.status(500);
res.json({ error: err.message });
});

log.debug('[Express] Starting server..');
const port =
typeof process.env.API_PORT === 'string'
Expand Down

0 comments on commit 996739f

Please sign in to comment.