refactor(handlers): migrate remaining backend handlers to clock.Now() and transaction patterns
Apply clock.Now() migration, transaction wrapping, and minor refactors across admin, scheduling, today, user, auth handler, notifications, webhooks, services, portfolio, ratelimit, testutils, and main.go. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"crussell/clock"
|
||||
"crussell/testutils"
|
||||
"crussell/handlers/bookings"
|
||||
"crussell/testutils/fixtures"
|
||||
@@ -116,7 +117,7 @@ func TestAdminRescheduleBooking(t *testing.T) {
|
||||
t.Fatalf("failed to create test service: %v", err)
|
||||
}
|
||||
|
||||
startTime := time.Now().Add(48 * time.Hour).Truncate(time.Second)
|
||||
startTime := clock.Now().Add(48 * time.Hour).Truncate(time.Second)
|
||||
bookingID, err := fixtures.CreateTestBookingAtTime(tx, userID, serviceID, startTime)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create test booking: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user