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/error/error.go Normal file
View File

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