From 211f0c32d21f6afe708c4fb37615ec23da2d2d7b Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Wed, 29 Dec 2021 23:57:30 +0100 Subject: [PATCH] Removed unused endpoint. (#18127) --- routers/web/user/home.go | 14 -------------- routers/web/web.go | 1 - 2 files changed, 15 deletions(-) diff --git a/routers/web/user/home.go b/routers/web/user/home.go index 8bbc6dd0c36..367cf5ca084 100644 --- a/routers/web/user/home.go +++ b/routers/web/user/home.go @@ -769,17 +769,3 @@ func ShowGPGKeys(ctx *context.Context, uid int64) { writer.Close() 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()) -} diff --git a/routers/web/web.go b/routers/web/web.go index 23daeb601f9..486255096dc 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -376,7 +376,6 @@ func RegisterRoutes(m *web.Route) { m.Post("/activate", user.ActivatePost, reqSignIn) m.Any("/activate_email", user.ActivateEmail) m.Get("/avatar/{username}/{size}", user.AvatarByUserName) - m.Get("/email2user", user.Email2User) m.Get("/recover_account", user.ResetPasswd) m.Post("/recover_account", user.ResetPasswdPost) m.Get("/forgot_password", user.ForgotPasswd)