fixes nil ref in tests

This commit is contained in:
bergquist
2019-01-22 16:16:32 +01:00
parent 31b5db06f1
commit c3ff3d644c
3 changed files with 15 additions and 8 deletions

View File

@@ -47,13 +47,13 @@ func (hs *HTTPServer) LoginView(c *m.ReqContext) {
return
//}
if redirectTo, _ := url.QueryUnescape(c.GetCookie("redirect_to")); len(redirectTo) > 0 {
c.SetCookie("redirect_to", "", -1, setting.AppSubUrl+"/")
c.Redirect(redirectTo)
return
}
// if redirectTo, _ := url.QueryUnescape(c.GetCookie("redirect_to")); len(redirectTo) > 0 {
// c.SetCookie("redirect_to", "", -1, setting.AppSubUrl+"/")
// c.Redirect(redirectTo)
// return
// }
c.Redirect(setting.AppSubUrl + "/")
// c.Redirect(setting.AppSubUrl + "/")
}
func tryOAuthAutoLogin(c *m.ReqContext) bool {