Refactor routes to use URL params instead of query params

Review Request #7006 — Created March 4, 2015 and submitted — Latest diff uploaded

Information

rb-gateway
master
ed1034b...

Reviewers

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/:id

Getting a file by commit and file path:
/repos/:repo/commits/:commit/path/:path

Getting the path of a repository:
/repos/:repo/path

Getting all branches:
/repos/:repo/branches

Getting all commits
/repos/:repo/branches/:branch/commits
OR /repos/:repo/branches/:branch/commits?start=:start

Getting a commit (includes the diff):
/repos/:repo/commits/:id

Getting the session:
/session

Verified that all new URLs still return the same contents as their old ones.

    Loading...