diff options
author | 2024-04-11 11:45:53 +0200 | |
---|---|---|
committer | 2024-04-11 11:45:53 +0200 | |
commit | 9fb8a78f91adffd5f4d28df1270e407c25a7a16e (patch) | |
tree | d68200744e28d07e75a52bb0c9f6593c86a38a91 /internal/web/web.go | |
parent | [performance] massively improved ActivityPub delivery worker efficiency (#2812) (diff) | |
download | gotosocial-9fb8a78f91adffd5f4d28df1270e407c25a7a16e.tar.xz |
[feature] New user sign-up via web page (#2796)
* [feature] User sign-up form and admin notifs
* add chosen + filtered languages to migration
* remove stray comment
* chosen languages schmosen schmanguages
* proper error on local account missing
Diffstat (limited to 'internal/web/web.go')
-rw-r--r-- | internal/web/web.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/web/web.go b/internal/web/web.go index 19df63332..185bf7120 100644 --- a/internal/web/web.go +++ b/internal/web/web.go @@ -49,6 +49,7 @@ const ( settingsPanelGlob = settingsPathPrefix + "/*panel" userPanelPath = settingsPathPrefix + "/user" adminPanelPath = settingsPathPrefix + "/admin" + signupPath = "/signup" cacheControlHeader = "Cache-Control" // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control cacheControlNoCache = "no-cache" // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#response_directives @@ -115,10 +116,13 @@ func (m *Module) Route(r *router.Router, mi ...gin.HandlerFunc) { r.AttachHandler(http.MethodGet, customCSSPath, m.customCSSGETHandler) r.AttachHandler(http.MethodGet, rssFeedPath, m.rssFeedGETHandler) r.AttachHandler(http.MethodGet, confirmEmailPath, m.confirmEmailGETHandler) + r.AttachHandler(http.MethodPost, confirmEmailPath, m.confirmEmailPOSTHandler) r.AttachHandler(http.MethodGet, robotsPath, m.robotsGETHandler) r.AttachHandler(http.MethodGet, aboutPath, m.aboutGETHandler) r.AttachHandler(http.MethodGet, domainBlockListPath, m.domainBlockListGETHandler) r.AttachHandler(http.MethodGet, tagsPath, m.tagGETHandler) + r.AttachHandler(http.MethodGet, signupPath, m.signupGETHandler) + r.AttachHandler(http.MethodPost, signupPath, m.signupPOSTHandler) // Attach redirects from old endpoints to current ones for backwards compatibility r.AttachHandler(http.MethodGet, "/auth/edit", func(c *gin.Context) { c.Redirect(http.StatusMovedPermanently, userPanelPath) }) |