Skip to content

Commit

Permalink
Json for / query returning only one element
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioBeneditto committed Feb 24, 2022
1 parent 6b7e86b commit e0bf6ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ app.get('/', (req, res) => {
hostName += ':' + port
}

res.json([{'newUrl': hostName + '/api'}])
res.json({'newUrl': hostName + '/api'})
})

app.post('/', (req, res) => {
Expand All @@ -31,7 +31,7 @@ app.get('/api', (req, res) => {
res.json(
{
'code': statusId,

}
)
})
Expand Down

0 comments on commit e0bf6ed

Please sign in to comment.