dkforest

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

commit a968429caee03cd69d5e2d45c1adc5b41c5716f3
parent aedf113d381c286647d8cf813fbd4440158d2c24
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sat, 30 Dec 2023 12:12:06 -0500

cleanup

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

diff --git a/pkg/web/middlewares/middlewares.go b/pkg/web/middlewares/middlewares.go @@ -295,7 +295,8 @@ func IsAuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc { c.Response().Header().Set("Cache-Control", "no-cache, no-store, must-revalidate") - db.DB().Model(user).Update("last_seen_at", time.Now()) + now := time.Now() + db.DB().Exec("UPDATE users SET last_seen_at = ?, updated_at = ? WHERE id = ?", now, now, int64(user.ID)) // Prevent clickjacking by setting the header on every logged in page if !strings.Contains(c.Path(), "/chess/:key/form") &&