summaryrefslogtreecommitdiff
path: root/internal/api/client/accounts
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-06-06 15:43:25 +0200
committerLibravatar GitHub <noreply@github.com>2024-06-06 14:43:25 +0100
commitbcda048eab799284fc46d74706334bf9ef76dc83 (patch)
treec4595fe5e6e6fd570d59cee7095a336f2e884344 /internal/api/client/accounts
parentdrop date (#2969) (diff)
downloadgotosocial-bcda048eab799284fc46d74706334bf9ef76dc83.tar.xz
[feature] Self-serve email change for users (#2957)
* [feature] Email change * frontend stuff for changing email * docs * tests etc * differentiate more clearly between local user+account and account * populate user
Diffstat (limited to 'internal/api/client/accounts')
-rw-r--r--internal/api/client/accounts/accountcreate.go6
-rw-r--r--internal/api/client/accounts/accountdelete.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/api/client/accounts/accountcreate.go b/internal/api/client/accounts/accountcreate.go
index 920b6d4d8..33d743791 100644
--- a/internal/api/client/accounts/accountcreate.go
+++ b/internal/api/client/accounts/accountcreate.go
@@ -105,9 +105,9 @@ func (m *Module) AccountCreatePOSTHandler(c *gin.Context) {
}
form.IP = signUpIP
- // Create the new account + user.
+ // Create the new user+account.
ctx := c.Request.Context()
- user, errWithCode := m.processor.Account().Create(
+ user, errWithCode := m.processor.User().Create(
ctx,
authed.Application,
form,
@@ -118,7 +118,7 @@ func (m *Module) AccountCreatePOSTHandler(c *gin.Context) {
}
// Get a token for the new user.
- ti, errWithCode := m.processor.Account().TokenForNewUser(
+ ti, errWithCode := m.processor.User().TokenForNewUser(
ctx,
authed.Token,
authed.Application,
diff --git a/internal/api/client/accounts/accountdelete.go b/internal/api/client/accounts/accountdelete.go
index 947634f70..9a1ef7931 100644
--- a/internal/api/client/accounts/accountdelete.go
+++ b/internal/api/client/accounts/accountdelete.go
@@ -91,7 +91,7 @@ func (m *Module) AccountDeletePOSTHandler(c *gin.Context) {
return
}
- if errWithCode := m.processor.Account().DeleteSelf(c.Request.Context(), authed.Account); errWithCode != nil {
+ if errWithCode := m.processor.User().DeleteSelf(c.Request.Context(), authed.Account); errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
}