summaryrefslogtreecommitdiff
path: root/internal/processing/markers
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-09-23 17:44:11 +0100
committerLibravatar GitHub <noreply@github.com>2023-09-23 18:44:11 +0200
commit8f67dd583d86155440e7905ae23083a9fea42f72 (patch)
treee67abf09a53c2d9053df8072b074a026969d93ef /internal/processing/markers
parent[chore] fix typo in slice.go (#2219) (diff)
downloadgotosocial-8f67dd583d86155440e7905ae23083a9fea42f72.tar.xz
[chore] deinterface the typeutils.Converter and update to use state structure (#2217)
* update typeconverter to use state structure * deinterface the typeutils.TypeConverter -> typeutils.Converter * finish copying over old type converter code comments * fix cherry-pick merge issues, fix tests pointing to old typeutils interface type still
Diffstat (limited to 'internal/processing/markers')
-rw-r--r--internal/processing/markers/get.go2
-rw-r--r--internal/processing/markers/markers.go10
-rw-r--r--internal/processing/markers/update.go2
3 files changed, 7 insertions, 7 deletions
diff --git a/internal/processing/markers/get.go b/internal/processing/markers/get.go
index dd94376f1..38e8b53dc 100644
--- a/internal/processing/markers/get.go
+++ b/internal/processing/markers/get.go
@@ -45,7 +45,7 @@ func (p *Processor) Get(ctx context.Context, account *gtsmodel.Account, names []
markers = append(markers, marker)
}
- apiMarker, err := p.tc.MarkersToAPIMarker(ctx, markers)
+ apiMarker, err := p.converter.MarkersToAPIMarker(ctx, markers)
if err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("error converting marker to api: %w", err))
}
diff --git a/internal/processing/markers/markers.go b/internal/processing/markers/markers.go
index 7a1215241..8817ed1a7 100644
--- a/internal/processing/markers/markers.go
+++ b/internal/processing/markers/markers.go
@@ -23,13 +23,13 @@ import (
)
type Processor struct {
- state *state.State
- tc typeutils.TypeConverter
+ state *state.State
+ converter *typeutils.Converter
}
-func New(state *state.State, tc typeutils.TypeConverter) Processor {
+func New(state *state.State, converter *typeutils.Converter) Processor {
return Processor{
- state: state,
- tc: tc,
+ state: state,
+ converter: converter,
}
}
diff --git a/internal/processing/markers/update.go b/internal/processing/markers/update.go
index 96eb17833..22fe65faf 100644
--- a/internal/processing/markers/update.go
+++ b/internal/processing/markers/update.go
@@ -39,7 +39,7 @@ func (p *Processor) Update(ctx context.Context, markers []*gtsmodel.Marker) (*ap
}
}
- apiMarker, err := p.tc.MarkersToAPIMarker(ctx, markers)
+ apiMarker, err := p.converter.MarkersToAPIMarker(ctx, markers)
if err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("error converting marker to api: %w", err))
}