Skip to content

Commit

Permalink
fix: remove console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeherby committed Sep 23, 2024
1 parent 7ab36e1 commit 0c60e12
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/ingest/src/routers/ingest-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ const langchainService = new LangchainToLangscoutService();
// Updated /batch route
router.post('/batch', (req, res) => {
console.debug('POST /api/runs/batch');
console.log('Received batch request:');

if (Array.isArray(req.body)) {
console.log(`It was an array and the length was ${req.body.length}`);
} else if (typeof req.body === 'object' && req.body !== null) {
if (typeof req.body === 'object' && req.body !== null) {
const keys = Object.keys(req.body);
keys.forEach(async (key) => {
if (key === 'post') {
Expand Down Expand Up @@ -43,7 +40,7 @@ router.post('/batch', (req, res) => {
}
});
} else {
console.log('Received data is neither an array nor a JSON object');
console.error('Received data is neither an array nor a JSON object');
}

res.status(200).json({ message: 'Batch request processed' });
Expand Down

0 comments on commit 0c60e12

Please sign in to comment.