Large manual tests corruption fix

This commit is contained in:
2026-03-02 18:07:13 +00:00
parent 817d5dd021
commit dd097c1022
14 changed files with 171 additions and 138 deletions
+1 -5
View File
@@ -4,8 +4,8 @@ import (
"crussell/db"
"crussell/handlers/notifications"
"crussell/internal/dav"
"crussell/mw"
"crussell/internal/validators"
"crussell/mw"
"database/sql"
"encoding/json"
"errors"
@@ -1240,7 +1240,6 @@ func CreateBookingHandler(w http.ResponseWriter, r *http.Request) {
if req.StartTime.Before(time.Now()) {
http.Error(w, "Start time cannot be in the past", http.StatusBadRequest)
return
return
}
// Validate booking fits within operating hours for regular users
@@ -1279,8 +1278,6 @@ func CreateBookingHandler(w http.ResponseWriter, r *http.Request) {
return
}
// Get created by from context (if available)
var createdBy *string
if creatorID, ok := r.Context().Value(mw.UserIDKey).(string); ok {
@@ -1761,7 +1758,6 @@ func ConfirmBookingHandler(w http.ResponseWriter, r *http.Request) {
return
}
tx, err := db.DB.Begin(r.Context())
if err != nil {
log.Printf("Failed to start transaction: %v", err)