dkforest

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

commit 8af5e6de6d81253f12eb991680ad2231e8cad03d
parent eb08fdef8ec56f77cfdff6eb20374a132ffe37a0
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun, 29 Jan 2023 05:50:25 -0800

fix restore link

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

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -1513,7 +1513,7 @@ func RestoreLinkHandler(c echo.Context) error { return c.Redirect(http.StatusFound, c.Request().Referer()) } database.NewAudit(*authUser, fmt.Sprintf("restore link %s", link.URL)) - database.DB.Unscoped().Model(&database.Link{}).Where("id", link.ID).Update("deleted_at", nil) + database.DB.Unscoped().Model(&database.Link{}).Where("id = ?", link.ID).Update("deleted_at", nil) return c.Redirect(http.StatusFound, c.Request().Referer()) }