diff --git a/assets/style/index.css b/assets/style/index.css new file mode 100644 index 0000000..40fa6e9 --- /dev/null +++ b/assets/style/index.css @@ -0,0 +1,4 @@ +.required { + color: red; + margin-left: 3px; +} \ No newline at end of file diff --git a/cmd/app/main.go b/cmd/app/main.go index 54f4aa1..1578869 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -67,22 +67,20 @@ func main() { mux.Handle("/assets/", http.StripPrefix("/assets/", fileServer)) // --- ROUTES --- - // GET Request: Shows the page AND handles the ?error=invalid logic - // We use the function from the auth package now - mux.HandleFunc("GET /login", authHandler.LoginView) - mux.HandleFunc("GET /signup", authHandler.SignupHandler) - mux.HandleFunc("GET /admin/addcard", adminHanlder.AddCardsView) - mux.HandleFunc("GET /admin/deactivatecard", adminHanlder.DeactivateView) + // POST Request: JSON API endpoints + mux.HandleFunc("POST /api/v1/loginauth", authHandler.LoginAuthHandler) // Login authentication endpoint + mux.HandleFunc("POST /api/v1/signupauth", authHandler.SignupHandler) - // POST Request: Processes the form - // This matches
+ +