This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"git.aiterp.net/rpdata/api/repositories"
|
||||
"git.aiterp.net/rpdata/api/database"
|
||||
"git.aiterp.net/rpdata/api/services/loaders"
|
||||
)
|
||||
|
||||
@@ -13,16 +13,16 @@ type Bundle struct {
|
||||
}
|
||||
|
||||
// NewBundle creates a new bundle.
|
||||
func NewBundle(repos *repositories.Bundle) *Bundle {
|
||||
func NewBundle(db database.Database) *Bundle {
|
||||
bundle := &Bundle{}
|
||||
|
||||
bundle.Changes = &ChangeService{
|
||||
changes: repos.Changes,
|
||||
changes: db.Changes(),
|
||||
}
|
||||
bundle.Tags = &TagService{tags: repos.Tags}
|
||||
bundle.Tags = &TagService{tags: db.Tags()}
|
||||
bundle.Characters = &CharacterService{
|
||||
characters: repos.Characters,
|
||||
loader: loaders.CharacterLoaderFromRepository(repos.Characters),
|
||||
characters: db.Characters(),
|
||||
loader: loaders.CharacterLoaderFromRepository(db.Characters()),
|
||||
changeService: bundle.Changes,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user