User code clean and ui improve

This commit is contained in:
Unknown 2014-05-05 16:21:43 -04:00
parent c1eb4d894a
commit bbdfe25769
19 changed files with 308 additions and 322 deletions

View file

@ -96,7 +96,7 @@ func runWeb(*cli.Context) {
m.Get("/avatar/:hash", avt.ServeHTTP)
m.Group("/user", func(r martini.Router) {
r.Get("/login", user.SignIn) // TODO
r.Get("/login", user.SignIn)
r.Post("/login", bindIgnErr(auth.LogInForm{}), user.SignInPost)
r.Get("/login/:name", user.SocialSignIn)
r.Get("/sign_up", user.SignUp)
@ -130,7 +130,7 @@ func runWeb(*cli.Context) {
m.Get("/user/:username", ignSignIn, user.Profile)
m.Group("/repo", func(r martini.Router) {
r.Get("/create", repo.Create)
r.Get("/create", repo.Create) // TODO
r.Post("/create", bindIgnErr(auth.CreateRepoForm{}), repo.CreatePost)
r.Get("/migrate", repo.Migrate)
r.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), repo.MigratePost)