summaryrefslogtreecommitdiff
path: root/internal/api/client/accounts
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/accounts')
-rw-r--r--internal/api/client/accounts/account_test.go2
-rw-r--r--internal/api/client/accounts/accountcreate.go2
-rw-r--r--internal/api/client/accounts/accountdelete.go2
-rw-r--r--internal/api/client/accounts/accountget.go2
-rw-r--r--internal/api/client/accounts/accounts.go4
-rw-r--r--internal/api/client/accounts/accountupdate.go2
-rw-r--r--internal/api/client/accounts/accountverify.go2
-rw-r--r--internal/api/client/accounts/block.go2
-rw-r--r--internal/api/client/accounts/follow.go2
-rw-r--r--internal/api/client/accounts/followers.go2
-rw-r--r--internal/api/client/accounts/following.go2
-rw-r--r--internal/api/client/accounts/relationships.go2
-rw-r--r--internal/api/client/accounts/statuses.go2
-rw-r--r--internal/api/client/accounts/unblock.go2
-rw-r--r--internal/api/client/accounts/unfollow.go2
15 files changed, 16 insertions, 16 deletions
diff --git a/internal/api/client/accounts/account_test.go b/internal/api/client/accounts/account_test.go
index 8a319e7fd..5a25c12f1 100644
--- a/internal/api/client/accounts/account_test.go
+++ b/internal/api/client/accounts/account_test.go
@@ -48,7 +48,7 @@ type AccountStandardTestSuite struct {
storage *storage.Driver
mediaManager media.Manager
federator federation.Federator
- processor processing.Processor
+ processor *processing.Processor
emailSender email.Sender
sentEmails map[string]string
diff --git a/internal/api/client/accounts/accountcreate.go b/internal/api/client/accounts/accountcreate.go
index 873d00beb..409105a2d 100644
--- a/internal/api/client/accounts/accountcreate.go
+++ b/internal/api/client/accounts/accountcreate.go
@@ -102,7 +102,7 @@ func (m *Module) AccountCreatePOSTHandler(c *gin.Context) {
}
form.IP = signUpIP
- ti, errWithCode := m.processor.AccountCreate(c.Request.Context(), authed, form)
+ ti, errWithCode := m.processor.Account().Create(c.Request.Context(), authed.Token, authed.Application, form)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/accountdelete.go b/internal/api/client/accounts/accountdelete.go
index b0c5e48de..64ea5e548 100644
--- a/internal/api/client/accounts/accountdelete.go
+++ b/internal/api/client/accounts/accountdelete.go
@@ -86,7 +86,7 @@ func (m *Module) AccountDeletePOSTHandler(c *gin.Context) {
form.DeleteOriginID = authed.Account.ID
- if errWithCode := m.processor.AccountDeleteLocal(c.Request.Context(), authed, form); errWithCode != nil {
+ if errWithCode := m.processor.Account().DeleteLocal(c.Request.Context(), authed.Account, form); errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
}
diff --git a/internal/api/client/accounts/accountget.go b/internal/api/client/accounts/accountget.go
index ca6b9c661..9fcbf7a4b 100644
--- a/internal/api/client/accounts/accountget.go
+++ b/internal/api/client/accounts/accountget.go
@@ -85,7 +85,7 @@ func (m *Module) AccountGETHandler(c *gin.Context) {
return
}
- acctInfo, errWithCode := m.processor.AccountGet(c.Request.Context(), authed, targetAcctID)
+ acctInfo, errWithCode := m.processor.Account().Get(c.Request.Context(), authed.Account, targetAcctID)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/accounts.go b/internal/api/client/accounts/accounts.go
index 4006b607d..02f900df5 100644
--- a/internal/api/client/accounts/accounts.go
+++ b/internal/api/client/accounts/accounts.go
@@ -74,10 +74,10 @@ const (
)
type Module struct {
- processor processing.Processor
+ processor *processing.Processor
}
-func New(processor processing.Processor) *Module {
+func New(processor *processing.Processor) *Module {
return &Module{
processor: processor,
}
diff --git a/internal/api/client/accounts/accountupdate.go b/internal/api/client/accounts/accountupdate.go
index 65a950514..3983fe8e1 100644
--- a/internal/api/client/accounts/accountupdate.go
+++ b/internal/api/client/accounts/accountupdate.go
@@ -153,7 +153,7 @@ func (m *Module) AccountUpdateCredentialsPATCHHandler(c *gin.Context) {
return
}
- acctSensitive, errWithCode := m.processor.AccountUpdate(c.Request.Context(), authed, form)
+ acctSensitive, errWithCode := m.processor.Account().Update(c.Request.Context(), authed.Account, form)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/accountverify.go b/internal/api/client/accounts/accountverify.go
index 868e095b8..59fc5b2b1 100644
--- a/internal/api/client/accounts/accountverify.go
+++ b/internal/api/client/accounts/accountverify.go
@@ -68,7 +68,7 @@ func (m *Module) AccountVerifyGETHandler(c *gin.Context) {
return
}
- acctSensitive, errWithCode := m.processor.AccountGet(c.Request.Context(), authed, authed.Account.ID)
+ acctSensitive, errWithCode := m.processor.Account().Get(c.Request.Context(), authed.Account, authed.Account.ID)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/block.go b/internal/api/client/accounts/block.go
index cfa452a5e..2cd7b5448 100644
--- a/internal/api/client/accounts/block.go
+++ b/internal/api/client/accounts/block.go
@@ -85,7 +85,7 @@ func (m *Module) AccountBlockPOSTHandler(c *gin.Context) {
return
}
- relationship, errWithCode := m.processor.AccountBlockCreate(c.Request.Context(), authed, targetAcctID)
+ relationship, errWithCode := m.processor.Account().BlockCreate(c.Request.Context(), authed.Account, targetAcctID)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/follow.go b/internal/api/client/accounts/follow.go
index 60e526ca1..d08f034e2 100644
--- a/internal/api/client/accounts/follow.go
+++ b/internal/api/client/accounts/follow.go
@@ -114,7 +114,7 @@ func (m *Module) AccountFollowPOSTHandler(c *gin.Context) {
}
form.ID = targetAcctID
- relationship, errWithCode := m.processor.AccountFollowCreate(c.Request.Context(), authed, form)
+ relationship, errWithCode := m.processor.Account().FollowCreate(c.Request.Context(), authed.Account, form)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/followers.go b/internal/api/client/accounts/followers.go
index a9b188d7b..f6d16705c 100644
--- a/internal/api/client/accounts/followers.go
+++ b/internal/api/client/accounts/followers.go
@@ -88,7 +88,7 @@ func (m *Module) AccountFollowersGETHandler(c *gin.Context) {
return
}
- followers, errWithCode := m.processor.AccountFollowersGet(c.Request.Context(), authed, targetAcctID)
+ followers, errWithCode := m.processor.Account().FollowersGet(c.Request.Context(), authed.Account, targetAcctID)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/following.go b/internal/api/client/accounts/following.go
index 9717816b0..eb46acb33 100644
--- a/internal/api/client/accounts/following.go
+++ b/internal/api/client/accounts/following.go
@@ -88,7 +88,7 @@ func (m *Module) AccountFollowingGETHandler(c *gin.Context) {
return
}
- following, errWithCode := m.processor.AccountFollowingGet(c.Request.Context(), authed, targetAcctID)
+ following, errWithCode := m.processor.Account().FollowingGet(c.Request.Context(), authed.Account, targetAcctID)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/relationships.go b/internal/api/client/accounts/relationships.go
index 1d176cfe0..1f75399ee 100644
--- a/internal/api/client/accounts/relationships.go
+++ b/internal/api/client/accounts/relationships.go
@@ -81,7 +81,7 @@ func (m *Module) AccountRelationshipsGETHandler(c *gin.Context) {
relationships := []apimodel.Relationship{}
for _, targetAccountID := range targetAccountIDs {
- r, errWithCode := m.processor.AccountRelationshipGet(c.Request.Context(), authed, targetAccountID)
+ r, errWithCode := m.processor.Account().RelationshipGet(c.Request.Context(), authed.Account, targetAccountID)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/statuses.go b/internal/api/client/accounts/statuses.go
index ba35d5c49..e5d5b0b23 100644
--- a/internal/api/client/accounts/statuses.go
+++ b/internal/api/client/accounts/statuses.go
@@ -233,7 +233,7 @@ func (m *Module) AccountStatusesGETHandler(c *gin.Context) {
publicOnly = i
}
- resp, errWithCode := m.processor.AccountStatusesGet(c.Request.Context(), authed, targetAcctID, limit, excludeReplies, excludeReblogs, maxID, minID, pinnedOnly, mediaOnly, publicOnly)
+ resp, errWithCode := m.processor.Account().StatusesGet(c.Request.Context(), authed.Account, targetAcctID, limit, excludeReplies, excludeReblogs, maxID, minID, pinnedOnly, mediaOnly, publicOnly)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/unblock.go b/internal/api/client/accounts/unblock.go
index 50213ad80..c0003771c 100644
--- a/internal/api/client/accounts/unblock.go
+++ b/internal/api/client/accounts/unblock.go
@@ -86,7 +86,7 @@ func (m *Module) AccountUnblockPOSTHandler(c *gin.Context) {
return
}
- relationship, errWithCode := m.processor.AccountBlockRemove(c.Request.Context(), authed, targetAcctID)
+ relationship, errWithCode := m.processor.Account().BlockRemove(c.Request.Context(), authed.Account, targetAcctID)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
diff --git a/internal/api/client/accounts/unfollow.go b/internal/api/client/accounts/unfollow.go
index 77dab0b07..ab480cf4f 100644
--- a/internal/api/client/accounts/unfollow.go
+++ b/internal/api/client/accounts/unfollow.go
@@ -86,7 +86,7 @@ func (m *Module) AccountUnfollowPOSTHandler(c *gin.Context) {
return
}
- relationship, errWithCode := m.processor.AccountFollowRemove(c.Request.Context(), authed, targetAcctID)
+ relationship, errWithCode := m.processor.Account().FollowRemove(c.Request.Context(), authed.Account, targetAcctID)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return