feat: added db transactions abstraction; cleaned up user registration; repos adapted new abstraction: all repos now support transactions, if present in ctx
This commit is contained in:
@@ -70,8 +70,8 @@ func main() {
|
||||
}
|
||||
|
||||
func seedAdminUser(db *sql.DB, email string, name string, password string) error {
|
||||
userRepo := repository.NewUserRepo(db)
|
||||
userService := domain.NewUserService(userRepo)
|
||||
store := repository.NewStore(db)
|
||||
userService := domain.NewUserService(store.User)
|
||||
|
||||
_, err := userService.CreateUser(context.Background(), email, name, password)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user