Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inaccessible route to list urls in group #180

Open
YashKumarVerma opened this issue May 29, 2020 · 1 comment · May be fixed by #181
Open

Inaccessible route to list urls in group #180

YashKumarVerma opened this issue May 29, 2020 · 1 comment · May be fixed by #181

Comments

@YashKumarVerma
Copy link
Contributor

YashKumarVerma commented May 29, 2020

route.get('/:code', async (req, res) => {
try {
const url = await findUrlByShortcode(req.params.code)
res.json(url)
} catch (err) {
Raven.captureException(err)
res.status(404).json({
error: err.message,
})
}
})
route.get('/:group', async (req, res) => {
try {
const urls = await findUrlsInGroup(req.params.group)
res.json(urls)
} catch (err) {
Raven.captureException(err)
res.status(404).json({
error: err.message,
})
}
})

Since both of the routes mentioned above look on the root i.e. (/api/url/:slug) the route to list the group is never executed, as the first route returns a 404.

This must be fixed as it makes listing URLs of a group impossible.


Bounty Claim : Triage needed.
Not sure when new claim option would close, therefore submitting with 0 bounty as not assigned.

@boss-contributions-bot
Copy link

boss-contributions-bot bot commented May 29, 2020

Thanks @YashKumarVerma, for raising the issue! 🙌

One of our mentors will revert on this soon.

Star this project and tweet 🐦 about BOSS 2020.

@YashKumarVerma YashKumarVerma linked a pull request May 29, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant