feat(api): update gamestate when joining
1 files changed, 2 insertions(+), 2 deletions(-) M api/handlers/joingame.go
M api/handlers/joingame.go => api/handlers/joingame.go +2 -2
@@ 58,8 58,8 @@ func JoinGame(c *gin.Context) { return } // if we are not the host, set us as the guest updatedGame := db.DbConn.Model(&game).Update("guest_id", newGuest.ID) // if we are not the host, set us as the guest, and "start" the game updatedGame := db.DbConn.Model(&game).Updates(models.Game{GuestID: newGuest.ID, State: models.GAMESTATE_INPROGRESS}) if updatedGame.Error != nil { c.JSON(http.StatusInternalServerError, gin.H{"error": apierror.Placeholder}) c.Abort()