add email confirm handler

This commit is contained in:
tsmethurst 2021-10-18 14:44:12 +02:00
commit 652b41d1ce
6 changed files with 90 additions and 1 deletions

View file

@ -23,9 +23,14 @@ import (
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
)
func (p *processor) UserChangePassword(ctx context.Context, authed *oauth.Auth, form *apimodel.PasswordChangeRequest) gtserror.WithCode {
return p.userProcessor.ChangePassword(ctx, authed.User, form.OldPassword, form.NewPassword)
}
func (p *processor) UserConfirmEmail(ctx context.Context, token string) (*gtsmodel.User, gtserror.WithCode) {
return p.userProcessor.ConfirmEmail(ctx, token)
}