mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-22 08:35:43 +00:00
rename repository factory
This commit is contained in:
parent
1827c61314
commit
68a27b7f82
4 changed files with 4 additions and 4 deletions
|
@ -114,7 +114,7 @@ func run(cfg *config.Config) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
app.db = c
|
app.db = c
|
||||||
app.repos = repo.EntAllRepos(c, cfg.Storage.Data)
|
app.repos = repo.New(c, cfg.Storage.Data)
|
||||||
app.services = services.NewServices(app.repos)
|
app.services = services.NewServices(app.repos)
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
|
@ -53,7 +53,7 @@ func TestMain(m *testing.M) {
|
||||||
}
|
}
|
||||||
|
|
||||||
tClient = client
|
tClient = client
|
||||||
tRepos = EntAllRepos(tClient, os.TempDir())
|
tRepos = New(tClient, os.TempDir())
|
||||||
defer client.Close()
|
defer client.Close()
|
||||||
|
|
||||||
bootstrap()
|
bootstrap()
|
||||||
|
|
|
@ -15,7 +15,7 @@ type AllRepos struct {
|
||||||
Attachments *AttachmentRepo
|
Attachments *AttachmentRepo
|
||||||
}
|
}
|
||||||
|
|
||||||
func EntAllRepos(db *ent.Client, root string) *AllRepos {
|
func New(db *ent.Client, root string) *AllRepos {
|
||||||
return &AllRepos{
|
return &AllRepos{
|
||||||
Users: &UserRepository{db},
|
Users: &UserRepository{db},
|
||||||
AuthTokens: &TokenRepository{db},
|
AuthTokens: &TokenRepository{db},
|
||||||
|
|
|
@ -62,7 +62,7 @@ func TestMain(m *testing.M) {
|
||||||
}
|
}
|
||||||
|
|
||||||
tClient = client
|
tClient = client
|
||||||
tRepos = repo.EntAllRepos(tClient, os.TempDir()+"/homebox")
|
tRepos = repo.New(tClient, os.TempDir()+"/homebox")
|
||||||
tSvc = NewServices(tRepos)
|
tSvc = NewServices(tRepos)
|
||||||
defer client.Close()
|
defer client.Close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue