diff options
author | Unknwon <u@gogs.io> | 2015-09-03 06:17:33 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-03 06:17:33 -0400 |
commit | e5b105e513cb8bfe728c451525d1d9fd7d0979eb (patch) | |
tree | b9a29c91bf501ac3d2af7d4702c555cfbf295e39 /cmd | |
parent | 8481adb255e2563cbd8dc5091e1efce8b370bcdb (diff) | |
download | gitea-e5b105e513cb8bfe728c451525d1d9fd7d0979eb.tar.gz gitea-e5b105e513cb8bfe728c451525d1d9fd7d0979eb.zip |
fix migrate API
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go index 5bde337967..c2658a5cee 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -229,11 +229,14 @@ func runWeb(ctx *cli.Context) { Post(bind(api.CreateRepoOption{}), v1.CreateRepo) m.Post("/org/:org/repos", middleware.ApiReqToken(), bind(api.CreateRepoOption{}), v1.CreateOrgRepo) - // TODO: https://github.com/gogits/go-gogs-client/wiki m.Group("/repos", func() { m.Get("/search", v1.SearchRepos) - m.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), v1.MigrateRepo) + m.Group("", func() { + m.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), v1.MigrateRepo) + }, middleware.ApiReqToken()) + + // TODO: https://github.com/gogits/go-gogs-client/wiki m.Group("/:username/:reponame", func() { m.Combo("/hooks").Get(v1.ListRepoHooks). Post(bind(api.CreateHookOption{}), v1.CreateRepoHook) |