Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Changes of routes #160

Merged
merged 1 commit into from
Aug 29, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,7 @@ func SetupRouter() *pat.Router {
router.Get("/user/{name}/keys", http.HandlerFunc(ListKeys))
router.Post("/user", http.HandlerFunc(NewUser))
router.Delete("/user/{name}", http.HandlerFunc(RemoveUser))
router.Post("/repository/grant", http.HandlerFunc(GrantAccess))
router.Post("/repository", http.HandlerFunc(NewRepository))
router.Delete("/repository/revoke", http.HandlerFunc(RevokeAccess))
router.Delete("/repository/{name:[^/]*/?[^/]+}", http.HandlerFunc(RemoveRepository))
router.Get("/repository/{name:[^/]*/?[^/]+}", http.HandlerFunc(GetRepository))
router.Put("/repository/{name:[^/]*/?[^/]+}", http.HandlerFunc(RenameRepository))
router.Get("/repository/{name:[^/]*/?[^/]+}/archive", http.HandlerFunc(GetArchive))
router.Get("/repository/{name:[^/]*/?[^/]+}/contents", http.HandlerFunc(GetFileContents))
router.Get("/repository/{name:[^/]*/?[^/]+}/tree", http.HandlerFunc(GetTree))
Expand All @@ -77,6 +72,11 @@ func SetupRouter() *pat.Router {
router.Get("/repository/{name:[^/]*/?[^/]+}/diff/commits", http.HandlerFunc(GetDiff))
router.Post("/repository/{name:[^/]*/?[^/]+}/commit", http.HandlerFunc(Commit))
router.Get("/repository/{name:[^/]*/?[^/]+}/logs", http.HandlerFunc(GetLog))
router.Post("/repository/grant", http.HandlerFunc(GrantAccess))
router.Post("/repository", http.HandlerFunc(NewRepository))
router.Get("/repository/{name:[^/]*/?[^/]+}", http.HandlerFunc(GetRepository))
router.Delete("/repository/{name:[^/]*/?[^/]+}", http.HandlerFunc(RemoveRepository))
router.Put("/repository/{name:[^/]*/?[^/]+}", http.HandlerFunc(RenameRepository))
router.Get("/healthcheck", http.HandlerFunc(HealthCheck))
router.Post("/hook/{name}", http.HandlerFunc(AddHook))
return router
Expand Down