refactor: remove empty services (#116)

* remove empty services

* remove old factory

* remove old static files

* cleanup more duplicate service code

* file/folder reorg
This commit is contained in:
Hayden 2022-10-29 20:05:38 -08:00 committed by GitHub
parent 6529549289
commit cd82fe0d89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
179 changed files with 514 additions and 582 deletions

View file

@ -3,7 +3,8 @@ package v1
import (
"net/http"
"github.com/hay-kot/homebox/backend/internal/services"
"github.com/hay-kot/homebox/backend/internal/core/services"
"github.com/hay-kot/homebox/backend/internal/data/repo"
"github.com/hay-kot/homebox/backend/pkgs/server"
)
@ -26,6 +27,7 @@ func WithRegistration(allowRegistration bool) func(*V1Controller) {
}
type V1Controller struct {
repo *repo.AllRepos
svc *services.AllServices
maxUploadSize int64
isDemo bool
@ -57,8 +59,9 @@ func BaseUrlFunc(prefix string) func(s string) string {
}
}
func NewControllerV1(svc *services.AllServices, options ...func(*V1Controller)) *V1Controller {
func NewControllerV1(svc *services.AllServices, repos *repo.AllRepos, options ...func(*V1Controller)) *V1Controller {
ctrl := &V1Controller{
repo: repos,
svc: svc,
allowRegistration: true,
}