mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-30 01:12:11 +03:00
refactor: use dependency injection in backend
This commit is contained in:
@@ -12,7 +12,7 @@ type Base struct {
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
func (b *Base) BeforeCreate(db *gorm.DB) (err error) {
|
||||
func (b *Base) BeforeCreate(_ *gorm.DB) (err error) {
|
||||
if b.ID == "" {
|
||||
b.ID = uuid.New().String()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user