1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

Removed unused endpoint. (#18127)

This commit is contained in:
KN4CK3R 2021-12-29 23:57:30 +01:00 committed by GitHub
parent 8ce1b539b1
commit 211f0c32d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 15 deletions

View File

@ -769,17 +769,3 @@ func ShowGPGKeys(ctx *context.Context, uid int64) {
writer.Close() writer.Close()
ctx.PlainTextBytes(http.StatusOK, buf.Bytes()) ctx.PlainTextBytes(http.StatusOK, buf.Bytes())
} }
// Email2User show user page via email
func Email2User(ctx *context.Context) {
u, err := user_model.GetUserByEmail(ctx.FormString("email"))
if err != nil {
if user_model.IsErrUserNotExist(err) {
ctx.NotFound("GetUserByEmail", err)
} else {
ctx.ServerError("GetUserByEmail", err)
}
return
}
ctx.Redirect(u.HomeLink())
}

View File

@ -376,7 +376,6 @@ func RegisterRoutes(m *web.Route) {
m.Post("/activate", user.ActivatePost, reqSignIn) m.Post("/activate", user.ActivatePost, reqSignIn)
m.Any("/activate_email", user.ActivateEmail) m.Any("/activate_email", user.ActivateEmail)
m.Get("/avatar/{username}/{size}", user.AvatarByUserName) m.Get("/avatar/{username}/{size}", user.AvatarByUserName)
m.Get("/email2user", user.Email2User)
m.Get("/recover_account", user.ResetPasswd) m.Get("/recover_account", user.ResetPasswd)
m.Post("/recover_account", user.ResetPasswdPost) m.Post("/recover_account", user.ResetPasswdPost)
m.Get("/forgot_password", user.ForgotPasswd) m.Get("/forgot_password", user.ForgotPasswd)