[chore] Deinterface processor and subprocessors (#1501)

* [chore] Deinterface processor and subprocessors

* expose subprocessors via function calls

* missing license header
This commit is contained in:
tobi
2023-02-22 16:05:26 +01:00
committed by GitHub
parent adb596600b
commit b6fbdc66c1
246 changed files with 2545 additions and 4549 deletions

View File

@@ -66,7 +66,7 @@ func (m *Module) profileGETHandler(c *gin.Context) {
return instance, nil
}
account, errWithCode := m.processor.AccountGetLocalByUsername(ctx, authed, username)
account, errWithCode := m.processor.Account().GetLocalByUsername(ctx, authed.Account, username)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, instanceGet)
return
@@ -102,7 +102,7 @@ func (m *Module) profileGETHandler(c *gin.Context) {
showBackToTop = true
}
statusResp, errWithCode := m.processor.AccountWebStatusesGet(ctx, account.ID, maxStatusID)
statusResp, errWithCode := m.processor.Account().WebStatusesGet(ctx, account.ID, maxStatusID)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, instanceGet)
return
@@ -142,7 +142,7 @@ func (m *Module) returnAPProfile(ctx context.Context, c *gin.Context, username s
ctx = context.WithValue(ctx, ap.ContextRequestingPublicKeySignature, signature)
}
user, errWithCode := m.processor.GetFediUser(ctx, username, c.Request.URL)
user, errWithCode := m.processor.Fedi().UserGet(ctx, username, c.Request.URL)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) //nolint:contextcheck
return