Remove unnecessary connection chain step
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user