feat (api): migrate to UUIDs. Not fully debugged, may contain bugs
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -63,7 +64,7 @@ func (a *App) Run() error {
|
||||
log.Printf("Failed add book to transaction: %v", tx.Error)
|
||||
return
|
||||
}
|
||||
if bookID > 0 {
|
||||
if bookID != uuid.Nil {
|
||||
addedBooks++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user