feat: booking can only in between specified hours

every booking happening outside these hours will be clamped to the hours
also added few more config options + regex filters
This commit is contained in:
2026-02-25 01:02:15 +01:00
parent f21ce9a3c3
commit 8bb1777519
7 changed files with 129 additions and 68 deletions

View File

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