mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-25 16:26:31 +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.repos = repo.EntAllRepos(c, cfg.Storage.Data)
|
||||
app.repos = repo.New(c, cfg.Storage.Data)
|
||||
app.services = services.NewServices(app.repos)
|
||||
|
||||
// =========================================================================
|
||||
|
|
|
@ -53,7 +53,7 @@ func TestMain(m *testing.M) {
|
|||
}
|
||||
|
||||
tClient = client
|
||||
tRepos = EntAllRepos(tClient, os.TempDir())
|
||||
tRepos = New(tClient, os.TempDir())
|
||||
defer client.Close()
|
||||
|
||||
bootstrap()
|
||||
|
|
|
@ -15,7 +15,7 @@ type AllRepos struct {
|
|||
Attachments *AttachmentRepo
|
||||
}
|
||||
|
||||
func EntAllRepos(db *ent.Client, root string) *AllRepos {
|
||||
func New(db *ent.Client, root string) *AllRepos {
|
||||
return &AllRepos{
|
||||
Users: &UserRepository{db},
|
||||
AuthTokens: &TokenRepository{db},
|
||||
|
|
|
@ -62,7 +62,7 @@ func TestMain(m *testing.M) {
|
|||
}
|
||||
|
||||
tClient = client
|
||||
tRepos = repo.EntAllRepos(tClient, os.TempDir()+"/homebox")
|
||||
tRepos = repo.New(tClient, os.TempDir()+"/homebox")
|
||||
tSvc = NewServices(tRepos)
|
||||
defer client.Close()
|
||||
|
||||
|
|
Loading…
Reference in a new issue