diff options
author | 2024-06-06 15:43:25 +0200 | |
---|---|---|
committer | 2024-06-06 14:43:25 +0100 | |
commit | bcda048eab799284fc46d74706334bf9ef76dc83 (patch) | |
tree | c4595fe5e6e6fd570d59cee7095a336f2e884344 /internal/api/client/user/user.go | |
parent | drop date (#2969) (diff) | |
download | gotosocial-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/user/user.go')
-rw-r--r-- | internal/api/client/user/user.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/api/client/user/user.go b/internal/api/client/user/user.go index 487b9684c..6ad176a2e 100644 --- a/internal/api/client/user/user.go +++ b/internal/api/client/user/user.go @@ -29,6 +29,8 @@ const ( BasePath = "/v1/user" // PasswordChangePath is the path for POSTing a password change request. PasswordChangePath = BasePath + "/password_change" + // EmailChangePath is the path for POSTing an email address change request. + EmailChangePath = BasePath + "/email_change" ) type Module struct { @@ -42,5 +44,7 @@ func New(processor *processing.Processor) *Module { } func (m *Module) Route(attachHandler func(method string, path string, f ...gin.HandlerFunc) gin.IRoutes) { + attachHandler(http.MethodGet, BasePath, m.UserGETHandler) attachHandler(http.MethodPost, PasswordChangePath, m.PasswordChangePOSTHandler) + attachHandler(http.MethodPost, EmailChangePath, m.EmailChangePOSTHandler) } |