Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/event-stream/event-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,36 @@ export async function startEventServer(opts: {
}
});

app.post('/stackerdb_chunks', async (req, res) => {
try {
await handleRawEventRequest(req);
if (isProdEnv) {
logger.warn(
'Received stackerdb_chunks message -- event not required for API operations and can cause db bloat and performance degradation in production'
);
}
await res.status(200).send({ result: 'ok' });
} catch (error) {
logger.error(error, 'error processing core-node /stackerdb_chunks');
await res.status(500).send({ error: error });
}
});

app.post('/proposal_response', async (req, res) => {
try {
await handleRawEventRequest(req);
if (isProdEnv) {
logger.warn(
'Received proposal_response message -- event not required for API operations and can cause db bloat and performance degradation in production'
);
}
await res.status(200).send({ result: 'ok' });
} catch (error) {
logger.error(error, 'error processing core-node /proposal_response');
await res.status(500).send({ error: error });
}
});

app.post('*', async (req, res) => {
await res.status(404).send({ error: `no route handler for ${req.url}` });
logger.error(`Unexpected event on path ${req.url}`);
Expand Down
Loading