Add index json endpoint and as_json for repos
optimize index controller
Merge pull request #1 from kenmazaika/repo-json-api

Add index json endpoint and as_json for repos