diff options
Diffstat (limited to 'internal/web/confirmemail.go')
-rw-r--r-- | internal/web/confirmemail.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/internal/web/confirmemail.go b/internal/web/confirmemail.go index c8b2cde64..7fa144543 100644 --- a/internal/web/confirmemail.go +++ b/internal/web/confirmemail.go @@ -24,7 +24,6 @@ import ( "github.com/gin-gonic/gin" apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util" - "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/gtserror" ) @@ -34,20 +33,19 @@ func (m *Module) confirmEmailGETHandler(c *gin.Context) { // if there's no token in the query, just serve the 404 web handler token := c.Query(tokenParam) if token == "" { - apiutil.ErrorHandler(c, gtserror.NewErrorNotFound(errors.New(http.StatusText(http.StatusNotFound))), m.processor.InstanceGet) + apiutil.ErrorHandler(c, gtserror.NewErrorNotFound(errors.New(http.StatusText(http.StatusNotFound))), m.processor.InstanceGetV1) return } user, errWithCode := m.processor.UserConfirmEmail(ctx, token) if errWithCode != nil { - apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGet) + apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) return } - host := config.GetHost() - instance, err := m.processor.InstanceGet(ctx, host) + instance, err := m.processor.InstanceGetV1(ctx) if err != nil { - apiutil.ErrorHandler(c, gtserror.NewErrorInternalError(err), m.processor.InstanceGet) + apiutil.ErrorHandler(c, gtserror.NewErrorInternalError(err), m.processor.InstanceGetV1) return } |