dkforest

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

commit a021cbb3f10f6e0a987a9c5e67bb26beb7b4d618
parent df14eb83bc65e58f08e66d16bb69995cf1368171
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu, 14 Dec 2023 13:20:25 -0500

move notif

Diffstat:
Mpkg/web/handlers/handlers.go | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -800,11 +800,6 @@ func PokerHomeHandler(c echo.Context) error { data.WithdrawAddress = c.Request().PostFormValue("withdraw_address") withdrawUniqueSub := utils.DoParseInt64(c.Request().PostFormValue("withdraw_unique")) - zeroUser := dutils.GetZeroUser(db) - rootAdminID := database.UserID(config.RootAdminID) - msg := fmt.Sprintf("new withdraw %s xmr by %s", withdrawAmount.XmrStr(), authUser.Username) - _, _ = db.CreateMsg(msg, msg, "", config.GeneralRoomID, zeroUser.ID, &rootAdminID) - if withdrawUniqueOrig == 0 || withdrawUniqueSub != withdrawUniqueOrig { data.Error = "form submitted twice, try again" return c.Render(http.StatusOK, "poker", data) @@ -847,6 +842,11 @@ func PokerHomeHandler(c echo.Context) error { return c.Render(http.StatusOK, "poker", data) } + zeroUser := dutils.GetZeroUser(db) + rootAdminID := database.UserID(config.RootAdminID) + msg := fmt.Sprintf("new withdraw %s xmr by %s", withdrawAmount.XmrStr(), authUser.Username) + _, _ = db.CreateMsg(msg, msg, "", config.GeneralRoomID, zeroUser.ID, &rootAdminID) + tx := db.Begin() if err := authUser.SubXmrBalanceStagenet(db, withdrawAmount+transactionFee); err != nil { data.Error = err.Error()