Refactor routes to use URL params instead of query params
Review Request #7006 — Created March 4, 2015 and submitted — Latest diff uploaded
Previously, routes were of the following format: /file?repo=:repo&id=:id. This isn't very clean and it's not obvious to the reader what it is doing. The design also isn't very RESTful. So the URLs have been refactored to look more closely to the following format: /repos/:repo/file/:id.
The new URLs are as followed:
Getting file blob, checking file existance:
/repos/:repo/file/:idGetting a file by commit and file path:
/repos/:repo/commits/:commit/path/:pathGetting the path of a repository:
/repos/:repo/pathGetting all branches:
/repos/:repo/branchesGetting all commits
/repos/:repo/branches/:branch/commits
OR /repos/:repo/branches/:branch/commits?start=:startGetting a commit (includes the diff):
/repos/:repo/commits/:idGetting the session:
/session
Verified that all new URLs still return the same contents as their old ones.