Skip to content

Commit

Permalink
Added rewriting to changes routes
Browse files Browse the repository at this point in the history
  • Loading branch information
runemadsen committed Oct 13, 2011
1 parent cf5b9a6 commit 93523a2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 2 additions & 0 deletions URLs.txt
Expand Up @@ -24,3 +24,5 @@ GET /changes/project/bar
GET /changes/project/bar/user/foo

curl 'http://itp.ic.ht/public/_changes?filter=cakemix/cake&project=cats&feed=continuous'

=> http://itpcakemix.com/changes/project/cats/user/rsm347
21 changes: 18 additions & 3 deletions rewrites.json
@@ -1,14 +1,29 @@
[{
"from": "/users/:key",
"from": "/user/:key",
"to": "/_view/users"
},
{
"from": "/projects/:key",
"from": "/project/:key",
"to": "/_view/projects"
},
{
"from": "/projects/:projectskey/users/:userskey",
"from": "/project/:projectskey/user/:userskey",
"to": "/_view/projects-users",
"query": { "key": [":projectskey", ":userskey"] }
},
{
"from" : "/changes/project/:project/user/:user",
"to" : "../../_changes",
"query" : {"feed" : "continuous", "filter" : "cakemix/cake", "project" : ":project", "user" : ":user"}
},
{
"from" : "/changes/project/:project",
"to" : "../../_changes",
"query" : {"feed" : "continuous", "filter" : "cakemix/cake", "project" : ":project"}
},
{
"from" : "/changes/user/:user",
"to" : "../../_changes",
"query" : {"feed" : "continuous", "filter" : "cakemix/cake", "user" : ":user"}
}
]

0 comments on commit 93523a2

Please sign in to comment.