remove unused user registration code
Some checks failed
Build and Deploy ytdlp-site / build-deploy (push) Has been cancelled
Some checks failed
Build and Deploy ytdlp-site / build-deploy (push) Has been cancelled
Signed-off-by: Carl Pearson <me@carlpearson.net>
This commit is contained in:
18
handlers.go
18
handlers.go
@@ -22,7 +22,6 @@ import (
|
||||
"ytdlp-site/originals"
|
||||
"ytdlp-site/playlists"
|
||||
"ytdlp-site/transcodes"
|
||||
"ytdlp-site/users"
|
||||
"ytdlp-site/ytdlp"
|
||||
)
|
||||
|
||||
@@ -36,23 +35,6 @@ type DisplayVideoClip struct {
|
||||
Stop string
|
||||
}
|
||||
|
||||
func registerHandler(c echo.Context) error {
|
||||
return c.Render(http.StatusOK, "register.html", nil)
|
||||
}
|
||||
|
||||
func registerPostHandler(c echo.Context) error {
|
||||
username := c.FormValue("username")
|
||||
password := c.FormValue("password")
|
||||
|
||||
err := users.Create(db, username, password)
|
||||
|
||||
if err != nil {
|
||||
return c.String(http.StatusInternalServerError, "Error creating user")
|
||||
}
|
||||
|
||||
return c.Redirect(http.StatusSeeOther, "/login")
|
||||
}
|
||||
|
||||
func homeHandler(c echo.Context) error {
|
||||
_, err := handlers.GetUser(c)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user