Remove unnecessary connection chain step

This commit is contained in:
lash
2025-01-04 21:02:08 +00:00
parent 3a9f3fa373
commit cc9760125a
10 changed files with 11 additions and 35 deletions

View File

@@ -32,9 +32,8 @@ type StorageService struct {
func NewStorageService(conn storage.ConnData) (*StorageService, error) {
svc := &StorageService{
svc: storage.NewMenuStorageService(""),
svc: storage.NewMenuStorageService(conn, ""),
}
svc.SetConn(conn)
return svc, nil
}
@@ -49,7 +48,3 @@ func(ss *StorageService) GetUserdataDb(ctx context.Context) (db.Db, error) {
func(ss *StorageService) GetResource(ctx context.Context) (resource.Resource, error) {
return nil, errors.New("not implemented")
}
func(ss *StorageService) SetConn(conn storage.ConnData) {
ss.svc = ss.svc.WithConn(conn)
}