summaryrefslogtreecommitdiff
path: root/internal/api/client/user
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/user')
-rw-r--r--internal/api/client/user/passwordchange.go2
-rw-r--r--internal/api/client/user/user.go4
-rw-r--r--internal/api/client/user/user_test.go2
3 files changed, 4 insertions, 4 deletions
diff --git a/internal/api/client/user/passwordchange.go b/internal/api/client/user/passwordchange.go
index c2b5c598d..f0cfe3dd6 100644
--- a/internal/api/client/user/passwordchange.go
+++ b/internal/api/client/user/passwordchange.go
@@ -95,7 +95,7 @@ func (m *Module) PasswordChangePOSTHandler(c *gin.Context) {
return
}
- if errWithCode := m.processor.UserChangePassword(c.Request.Context(), authed, form); errWithCode != nil {
+ if errWithCode := m.processor.User().PasswordChange(c.Request.Context(), authed.User, form.OldPassword, form.NewPassword); errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
}
diff --git a/internal/api/client/user/user.go b/internal/api/client/user/user.go
index f09984380..1117db08f 100644
--- a/internal/api/client/user/user.go
+++ b/internal/api/client/user/user.go
@@ -33,10 +33,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/user/user_test.go b/internal/api/client/user/user_test.go
index 27058d5ca..c990abb56 100644
--- a/internal/api/client/user/user_test.go
+++ b/internal/api/client/user/user_test.go
@@ -41,7 +41,7 @@ type UserStandardTestSuite struct {
mediaManager media.Manager
federator federation.Federator
emailSender email.Sender
- processor processing.Processor
+ processor *processing.Processor
storage *storage.Driver
testTokens map[string]*gtsmodel.Token