fix: correct UUID format string issues in logging and tests
- Fix scheduler.go log.Printf calls to convert pgtype.UUID to string before formatting - Fix ebook.go fmt.Printf calls to convert pgtype.UUID to string before formatting - Add missing Enabled field to rate limiter config in security test - Prevents format string errors when logging library IDs This resolves compilation errors where pgtype.UUID was being formatted with %s which expects a string, not a UUID struct.
This commit is contained in:
@@ -797,11 +797,12 @@ func (h *Handler) StartWatchModeForAllLibraries(ctx context.Context) error {
|
||||
}
|
||||
|
||||
for _, library := range libraries {
|
||||
libraryIDStr := fmt.Sprintf("%x", library.ID.Bytes)
|
||||
if err := h.StartWatchModeForLibrary(ctx, library.ID, library.ID); err != nil {
|
||||
fmt.Printf("Warning: failed to start watch mode for library %s: %v\n", library.ID, err)
|
||||
fmt.Printf("Warning: failed to start watch mode for library %s: %v\n", libraryIDStr, err)
|
||||
continue
|
||||
}
|
||||
fmt.Printf("Started watch mode for library %s (%s)\n", library.Name, library.ID)
|
||||
fmt.Printf("Started watch mode for library %s (%s)\n", library.Name, libraryIDStr)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user