Skip to content

Commit

Permalink
err
Browse files Browse the repository at this point in the history
  • Loading branch information
bramses committed Oct 19, 2023
1 parent 3aa7ef7 commit dd7ec82
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@ app.get('/', (req, res) => {
})

app.post('/search', async (req, res) => {
console.log(req.body)
const query = req.body.query
const results = await similaritySearch(query)
res.send(results)
try {
console.log(req.body)
const query = req.body.query
const results = await similaritySearch(query)
res.send(results)
} catch (err) {
console.log(err)
res.status(500).send({
error: err
})
}
})

app.post('/dalle-to-cf', async (req, res) => {
Expand Down

0 comments on commit dd7ec82

Please sign in to comment.