Skip to content

Commit

Permalink
get > post
Browse files Browse the repository at this point in the history
  • Loading branch information
bramses committed Oct 6, 2023
1 parent 2d83f94 commit 31d1eb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ app.post('/search', async (req, res) => {
})

app.post('/share', async (req, res) => {
console.log(req.body)
// console.log(req.body)
const url = req.body.url
const text = req.body.text
const result = await sharePic(url, text)
Expand All @@ -55,9 +55,9 @@ app.post('/share', async (req, res) => {
})
})

app.get('/random', async (req, res) => {
app.post('/random', async (req, res) => {
let amount = 1
if (req.amount)
if (req.body.amount)
amount = req.amount
const result = await fetchRandomHighlight(amount)
res.send(result)
Expand Down

0 comments on commit 31d1eb8

Please sign in to comment.