feat: raising hand endpoint
This commit is contained in:
@@ -13,6 +13,16 @@ import (
|
||||
|
||||
type PersonId int
|
||||
|
||||
func (p PersonId) MarshalBinary() ([]byte, error) {
|
||||
bytes, err := json.Marshal(p)
|
||||
return bytes, err
|
||||
}
|
||||
|
||||
func (p *PersonId) UnmarshalBinary(data []byte) error {
|
||||
err := json.Unmarshal(data, p)
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO move to rooms i guess
|
||||
func RandomPersonId() PersonId {
|
||||
randInt := rand.Int()
|
||||
@@ -81,6 +91,7 @@ func (redisRM RedisRM) Update(ctx context.Context, roomName string, f func(fromR
|
||||
return err
|
||||
}
|
||||
|
||||
savedRoom.InitMaps()
|
||||
room := f(savedRoom)
|
||||
|
||||
_, err = tx.Pipelined(ctx, func(pipe redis.Pipeliner) error {
|
||||
|
||||
Reference in New Issue
Block a user