fixed minor bugs + added loggin middleware
All checks were successful
Tests / Run Go Tests (push) Successful in 1m26s
All checks were successful
Tests / Run Go Tests (push) Successful in 1m26s
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user