Add password validation

This commit is contained in:
2024-04-25 22:51:37 +07:00
commit 2e2fbdf800
51 changed files with 3526 additions and 0 deletions

23
handler/index/index.go Normal file
View File

@ -0,0 +1,23 @@
package indexHandler
import (
"github.com/fossyy/filekeeper/logger"
"github.com/fossyy/filekeeper/view/index"
"net/http"
)
var log *logger.AggregatedLogger
func init() {
log = logger.Logger()
}
func GET(w http.ResponseWriter, r *http.Request) {
component := indexView.Main("main page")
err := component.Render(r.Context(), w)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
log.Error(err.Error())
return
}
}