dkforest

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

commit 375a0ccbd2eef6b1672964a7b23ffcbe6671071d
parent 4b5fd8682ad6230e06cc5cee5fb2ce5e8bbad3d5
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue, 19 Dec 2023 01:03:29 -0500

cleanup

Diffstat:
Mpkg/web/handlers/poker.go | 2+-
Mpkg/web/handlers/poker/poker.go | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkg/web/handlers/poker.go b/pkg/web/handlers/poker.go @@ -517,7 +517,7 @@ func PokerDealHandler(c echo.Context) error { return c.NoContent(http.StatusNotFound) } if c.Request().Method == http.MethodPost { - g.Deal(roomID, authUser) + g.Deal(roomID, authUser.ID) } html := hutils.HtmlCssReset html += `<form method="post"><button>Deal</button></form>` diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -1431,9 +1431,9 @@ func cardToPokerCard(name string) string { return r.Replace(name) } -func (g *PokerGame) Deal(roomID RoomID, authUser *database.User) { +func (g *PokerGame) Deal(roomID RoomID, userID database.UserID) { roomTopic := roomID.Topic() - roomUserTopic := roomID.UserTopic(authUser.ID) + roomUserTopic := roomID.UserTopic(userID) if g.countEligibleSeated() < 2 { PokerPubSub.Pub(roomUserTopic, ErrorMsgEvent{Message: "need at least 2 players"}) return