Changed from goconfig to its new counter part go-ini

This commit is contained in:
Torkel Ödegaard
2015-01-27 10:09:54 +01:00
parent 951ce0a102
commit 95305e7e11
6 changed files with 99 additions and 65 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ func Register(r *macaron.Macaron) {
r.Post("/logout", LogoutPost)
r.Post("/login", bind(dtos.LoginCommand{}), LoginPost)
r.Get("/login/:name", OAuthLogin)
r.Get("/login", Index)
r.Get("/login", LoginView)
// authed views
r.Get("/profile/", reqSignedIn, Index)
+9
View File
@@ -9,6 +9,15 @@ import (
"github.com/torkelo/grafana-pro/pkg/util"
)
func LoginView(c *middleware.Context) {
if err := setIndexViewData(c); err != nil {
c.Handle(500, "Failed to get settings", err)
return
}
c.HTML(200, "index")
}
func LoginPost(c *middleware.Context, cmd dtos.LoginCommand) {
userQuery := m.GetUserByLoginQuery{LoginOrEmail: cmd.User}