diff options
Diffstat (limited to 'pkg/view/auth.go')
-rw-r--r-- | pkg/view/auth.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/pkg/view/auth.go b/pkg/view/auth.go index 5c83eba..d44424d 100644 --- a/pkg/view/auth.go +++ b/pkg/view/auth.go @@ -64,23 +64,6 @@ func (v *AuthView) Login(ctx *fasthttp.RequestCtx) error { return nil } -func (v *AuthView) RegisterView(ctx *fasthttp.RequestCtx) error { - return img.Render[interface{}](ctx, "register.html", nil) -} - -func (v *AuthView) Register(ctx *fasthttp.RequestCtx) error { - username := ctx.FormValue("username") - password := ctx.FormValue("password") - - err := v.userController.Register(ctx, username, password) - if err != nil { - return err - } - - ctx.Redirect("/login", 307) - return nil -} - func Index(ctx *fasthttp.RequestCtx) { ctx.Redirect("/login", 307) } @@ -89,9 +72,6 @@ func (v *AuthView) SetMyselfIn(r *ext.Router) { r.GET("/login", v.LoginView) r.POST("/login", v.Login) - r.GET("/register", v.RegisterView) - r.POST("/register", v.Register) - r.GET("/logout", v.Logout) r.POST("/logout", v.Logout) } |