Browse Source

add ai index

tags/v1.21.12.1
lewis 4 years ago
parent
commit
06715a7a7b
2 changed files with 5 additions and 5 deletions
  1. +1
    -1
      routers/routes/routes.go
  2. +4
    -4
      routers/user/auth.go

+ 1
- 1
routers/routes/routes.go View File

@@ -311,7 +311,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Head("/", func() string { m.Head("/", func() string {
return "" return ""
}) })
m.Get("/", routers.Dashboard)
m.Get("/", routers.Home)
m.Get("/dashboard", routers.Dashboard) m.Get("/dashboard", routers.Dashboard)
m.Group("/explore", func() { m.Group("/explore", func() {
m.Get("", func(ctx *context.Context) { m.Get("", func(ctx *context.Context) {


+ 4
- 4
routers/user/auth.go View File

@@ -544,7 +544,7 @@ func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyR


if err := models.UpdateUserCols(u, "language"); err != nil { if err := models.UpdateUserCols(u, "language"); err != nil {
log.Error(fmt.Sprintf("Error updating user language [user: %d, locale: %s]", u.ID, u.Language)) log.Error(fmt.Sprintf("Error updating user language [user: %d, locale: %s]", u.ID, u.Language))
return setting.AppSubURL + "/"
return setting.AppSubURL + "/dashboard"
} }
} else { } else {
// Language setting of the user use the one previously set // Language setting of the user use the one previously set
@@ -562,7 +562,7 @@ func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyR
u.SetLastLogin() u.SetLastLogin()
if err := models.UpdateUserCols(u, "last_login_unix"); err != nil { if err := models.UpdateUserCols(u, "last_login_unix"); err != nil {
ctx.ServerError("UpdateUserCols", err) ctx.ServerError("UpdateUserCols", err)
return setting.AppSubURL + "/"
return setting.AppSubURL + "/dashboard"
} }


if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 && !util.IsExternalURL(redirectTo) { if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 && !util.IsExternalURL(redirectTo) {
@@ -574,9 +574,9 @@ func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyR
} }


if obeyRedirect { if obeyRedirect {
ctx.Redirect(setting.AppSubURL + "/")
ctx.Redirect(setting.AppSubURL + "/dashboard")
} }
return setting.AppSubURL + "/"
return setting.AppSubURL + "/dashboard"
} }


// SignInOAuth handles the OAuth2 login buttons // SignInOAuth handles the OAuth2 login buttons


Loading…
Cancel
Save