remove: tenantslug

This commit is contained in:
Rogee
2025-01-15 20:31:21 +08:00
parent 13566cfa38
commit dbe1e19be2
24 changed files with 521 additions and 301 deletions

View File

@@ -3,25 +3,31 @@ package posts
import (
"database/sql"
"backend/app/http/medias"
"backend/app/http/tenants"
"backend/app/http/users"
"backend/providers/event"
"backend/providers/hashids"
"git.ipao.vip/rogeecn/atom"
"git.ipao.vip/rogeecn/atom/container"
"git.ipao.vip/rogeecn/atom/contracts"
"git.ipao.vip/rogeecn/atom/utils/opt"
"github.com/speps/go-hashids/v2"
)
func Provide(opts ...opt.Option) error {
if err := container.Container.Provide(func(
hashIds *hashids.HashID,
event *event.PubSub,
hashId *hashids.Hasher,
mediaSvc *medias.Service,
svc *Service,
tenantSvc *tenants.Service,
userSvc *users.Service,
) (*Controller, error) {
obj := &Controller{
hashIds: hashIds,
event: event,
hashId: hashId,
mediaSvc: mediaSvc,
svc: svc,
tenantSvc: tenantSvc,
userSvc: userSvc,
@@ -50,7 +56,7 @@ func Provide(opts ...opt.Option) error {
}
if err := container.Container.Provide(func(
db *sql.DB,
hashIds *hashids.HashID,
hashIds *hashids.Hasher,
) (*Service, error) {
obj := &Service{
db: db,