diff options
Diffstat (limited to 'internal/web')
-rw-r--r-- | internal/web/confirmemail.go | 2 | ||||
-rw-r--r-- | internal/web/customcss.go | 2 | ||||
-rw-r--r-- | internal/web/profile.go | 6 | ||||
-rw-r--r-- | internal/web/rss.go | 2 | ||||
-rw-r--r-- | internal/web/thread.go | 8 | ||||
-rw-r--r-- | internal/web/web.go | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/internal/web/confirmemail.go b/internal/web/confirmemail.go index 7fa144543..8efb22cc8 100644 --- a/internal/web/confirmemail.go +++ b/internal/web/confirmemail.go @@ -37,7 +37,7 @@ func (m *Module) confirmEmailGETHandler(c *gin.Context) { return } - user, errWithCode := m.processor.UserConfirmEmail(ctx, token) + user, errWithCode := m.processor.User().EmailConfirm(ctx, token) if errWithCode != nil { apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) return diff --git a/internal/web/customcss.go b/internal/web/customcss.go index 913f3be01..5f41d890b 100644 --- a/internal/web/customcss.go +++ b/internal/web/customcss.go @@ -51,7 +51,7 @@ func (m *Module) customCSSGETHandler(c *gin.Context) { return } - customCSS, errWithCode := m.processor.AccountGetCustomCSSForUsername(c.Request.Context(), username) + customCSS, errWithCode := m.processor.Account().GetCustomCSSForUsername(c.Request.Context(), username) if errWithCode != nil { apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) return diff --git a/internal/web/profile.go b/internal/web/profile.go index 482e5caa7..2319e5dc9 100644 --- a/internal/web/profile.go +++ b/internal/web/profile.go @@ -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 diff --git a/internal/web/rss.go b/internal/web/rss.go index dccb49542..819494c98 100644 --- a/internal/web/rss.go +++ b/internal/web/rss.go @@ -99,7 +99,7 @@ func (m *Module) rssFeedGETHandler(c *gin.Context) { ifNoneMatch := c.Request.Header.Get(ifNoneMatchHeader) ifModifiedSince := extractIfModifiedSince(c.Request) - getRssFeed, accountLastPostedPublic, errWithCode := m.processor.AccountGetRSSFeedForUsername(ctx, username) + getRssFeed, accountLastPostedPublic, errWithCode := m.processor.Account().GetRSSFeedForUsername(ctx, username) if errWithCode != nil { apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) return diff --git a/internal/web/thread.go b/internal/web/thread.go index af5363fd1..e657aa91b 100644 --- a/internal/web/thread.go +++ b/internal/web/thread.go @@ -72,12 +72,12 @@ func (m *Module) threadGETHandler(c *gin.Context) { // do this check to make sure the status is actually from a local account, // we shouldn't render threads from statuses that don't belong to us! - if _, errWithCode := m.processor.AccountGetLocalByUsername(ctx, authed, username); errWithCode != nil { + if _, errWithCode := m.processor.Account().GetLocalByUsername(ctx, authed.Account, username); errWithCode != nil { apiutil.ErrorHandler(c, errWithCode, instanceGet) return } - status, errWithCode := m.processor.StatusGet(ctx, authed, statusID) + status, errWithCode := m.processor.Status().Get(ctx, authed.Account, statusID) if errWithCode != nil { apiutil.ErrorHandler(c, errWithCode, instanceGet) return @@ -97,7 +97,7 @@ func (m *Module) threadGETHandler(c *gin.Context) { return } - context, errWithCode := m.processor.StatusGetContext(ctx, authed, statusID) + context, errWithCode := m.processor.Status().ContextGet(ctx, authed.Account, statusID) if errWithCode != nil { apiutil.ErrorHandler(c, errWithCode, instanceGet) return @@ -132,7 +132,7 @@ func (m *Module) returnAPStatus(ctx context.Context, c *gin.Context, username st ctx = context.WithValue(ctx, ap.ContextRequestingPublicKeySignature, signature) } - status, errWithCode := m.processor.GetFediStatus(ctx, username, statusID, c.Request.URL) + status, errWithCode := m.processor.Fedi().StatusGet(ctx, username, statusID, c.Request.URL) if errWithCode != nil { apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) //nolint:contextcheck return diff --git a/internal/web/web.go b/internal/web/web.go index a6b5a45da..ef0100cae 100644 --- a/internal/web/web.go +++ b/internal/web/web.go @@ -61,12 +61,12 @@ const ( ) type Module struct { - processor processing.Processor + processor *processing.Processor eTagCache cache.Cache[string, eTagCacheEntry] isURIBlocked func(context.Context, *url.URL) (bool, db.Error) } -func New(db db.DB, processor processing.Processor) *Module { +func New(db db.DB, processor *processing.Processor) *Module { return &Module{ processor: processor, eTagCache: newETagCache(), |