CHANGE: refractor + refined user routes, added change pw form and function

This commit is contained in:
2025-02-23 15:46:34 +01:00
parent 64468271d1
commit fdd6416ad9
12 changed files with 331 additions and 188 deletions

View File

@@ -29,7 +29,7 @@ func TimeCreateHandler(w http.ResponseWriter, r *http.Request) {
// Creates a booking from the http query params -> no body needed
// after that entry wi'll be written to database and the booking is returned as json
func createBooking(w http.ResponseWriter, r *http.Request) {
if(!checkPassword(r)){
if !checkPassword(r) {
log.Println("Wrong or no API key provided!")
http.Error(w, "Wrong or no API key provided", http.StatusUnauthorized)
return