rename repository factory

This commit is contained in:
Hayden 2022-10-06 15:02:15 -05:00
parent 1827c61314
commit 68a27b7f82
4 changed files with 4 additions and 4 deletions

View file

@ -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)
// =========================================================================

View file

@ -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()

View file

@ -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},

View file

@ -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()