Skip to content

Commit f1ad785

Browse files
KN4CK3RStelios Malathouras
authored and
Stelios Malathouras
committed
Removed unused endpoint. (go-gitea#18127)
1 parent 9710ad4 commit f1ad785

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

routers/web/user/home.go

-14
Original file line numberDiff line numberDiff line change
@@ -769,17 +769,3 @@ func ShowGPGKeys(ctx *context.Context, uid int64) {
769769
writer.Close()
770770
ctx.PlainTextBytes(http.StatusOK, buf.Bytes())
771771
}
772-
773-
// Email2User show user page via email
774-
func Email2User(ctx *context.Context) {
775-
u, err := user_model.GetUserByEmail(ctx.FormString("email"))
776-
if err != nil {
777-
if user_model.IsErrUserNotExist(err) {
778-
ctx.NotFound("GetUserByEmail", err)
779-
} else {
780-
ctx.ServerError("GetUserByEmail", err)
781-
}
782-
return
783-
}
784-
ctx.Redirect(u.HomeLink())
785-
}

routers/web/web.go

-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ func RegisterRoutes(m *web.Route) {
376376
m.Post("/activate", user.ActivatePost, reqSignIn)
377377
m.Any("/activate_email", user.ActivateEmail)
378378
m.Get("/avatar/{username}/{size}", user.AvatarByUserName)
379-
m.Get("/email2user", user.Email2User)
380379
m.Get("/recover_account", user.ResetPasswd)
381380
m.Post("/recover_account", user.ResetPasswdPost)
382381
m.Get("/forgot_password", user.ForgotPasswd)

0 commit comments

Comments
 (0)