fixed minor bugs + added loggin middleware
All checks were successful
Tests / Run Go Tests (push) Successful in 1m26s

This commit is contained in:
2026-01-18 00:07:54 +01:00
parent 502955d32f
commit 560c539b19
6 changed files with 28 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ import (
"errors"
"log"
"net/http"
"time"
)
// Relevant for arduino inputs -> creates new Booking from get and put method
@@ -36,6 +37,7 @@ func createBooking(w http.ResponseWriter, r *http.Request) {
}
booking := (*models.Booking).FromUrlParams(nil, r.URL.Query())
booking.Timestamp = time.Now()
if booking.Verify() {
err := booking.Insert()
if errors.Is(models.SameBookingError{}, err) {