summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-29 17:31:53 +0800
committerUnknwon <joe2010xtmf@163.com>2014-08-29 17:31:53 +0800
commit904bf1a50b021798344f8e124439bdd6a4db9cfc (patch)
treedc9252e24a038787aef9f93eb7cbd14f39044f58 /cmd/web.go
parent88291745747ffb200b55ca62e1054d1d2c4315d3 (diff)
downloadgitea-904bf1a50b021798344f8e124439bdd6a4db9cfc.tar.gz
gitea-904bf1a50b021798344f8e124439bdd6a4db9cfc.zip
Add migrate repo API
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 8e471eb61f..de1aa03cc2 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -138,10 +138,15 @@ func runWeb(*cli.Context) {
r.Post("/markdown/raw", v1.MarkdownRaw)
// Users.
- r.Get("/users/search", v1.SearchUsers)
+ m.Group("/users", func(r *macaron.Router) {
+ r.Get("/search", v1.SearchUsers)
+ })
// Repositories.
- r.Get("/repos/search", v1.SearchRepos)
+ m.Group("/repos", func(r *macaron.Router) {
+ r.Get("/search", v1.SearchRepos)
+ r.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), v1.Migrate)
+ })
r.Any("/*", func(ctx *middleware.Context) {
ctx.JSON(404, &base.ApiJsonErr{"Not Found", v1.DOC_URL})