dkforest

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

commit aeb317db41bfa0651340bff00dd277d6a111774e
parent c712657e9369c1d63beb0824b4bfe8cf06ce1ffa
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon,  6 Feb 2023 14:38:59 -0800

fix typo in middleware

Diffstat:
Mpkg/web/middlewares/middlewares.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/web/middlewares/middlewares.go b/pkg/web/middlewares/middlewares.go @@ -330,7 +330,7 @@ func IsModeratorMiddleware(next echo.HandlerFunc) echo.HandlerFunc { if strings.HasPrefix(c.Path(), "/api") { if user == nil { return c.NoContent(http.StatusUnauthorized) - } else if !user.IsAdmin { + } else if !user.IsModerator() { return c.NoContent(http.StatusForbidden) } return c.NoContent(http.StatusInternalServerError)