dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 2cb525ee9aba0175ee6546551218b4c99d776c17
parent 52fd92d290e0b0eec6b908a7eb70faec1b3868d3
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun,  4 Dec 2022 04:06:17 -0500

remove useless code

Diffstat:
Mpkg/web/web.go | 10+---------
1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/pkg/web/web.go b/pkg/web/web.go @@ -33,14 +33,6 @@ import ( yaml "gopkg.in/yaml.v1" ) -func wrapHandler(h http.Handler) echo.HandlerFunc { - return func(c echo.Context) error { - // TODO: add basic auth ? - h.ServeHTTP(c.Response(), c.Request()) - return nil - } -} - func getMainServer() echo.HandlerFunc { i18nBundle := getI18nBundle() e := echo.New() @@ -235,7 +227,7 @@ func getMainServer() echo.HandlerFunc { moderatorGroup.GET("/settings/invitations", handlers.SettingsInvitationsHandler) moderatorGroup.POST("/settings/invitations", handlers.SettingsInvitationsHandler) adminGroup := e.Group("", middlewares.IsAdminMiddleware) - adminGroup.GET("/debug/*", wrapHandler(http.DefaultServeMux)) + adminGroup.GET("/debug/*", echo.WrapHandler(http.DefaultServeMux)) adminGroup.GET("/admin", handlers.AdminHandler) adminGroup.POST("/admin", handlers.AdminHandler) adminGroup.GET("/admin/ignored", handlers.IgnoredHandler)