diff options
author | 2023-02-02 14:08:13 +0100 | |
---|---|---|
committer | 2023-02-02 14:08:13 +0100 | |
commit | 382512a5a6cc3f13576bbde8d607098d019f4063 (patch) | |
tree | dc2ccd1d30cd65b3f3d576a8d2a6910bbecc593a /internal/web/confirmemail.go | |
parent | [chore/performance] use only 1 sqlite db connection regardless of multiplier ... (diff) | |
download | gotosocial-382512a5a6cc3f13576bbde8d607098d019f4063.tar.xz |
[feature] Implement `/api/v2/instance` endpoint (#1409)
* interim: start adding /api/v2/instance
* finish up
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 } |