Skip to content

Disallow game names with spaces#474

Merged
nicolodavis merged 4 commits into
boardgameio:masterfrom
jasonharrison:GH-459
Sep 30, 2019
Merged

Disallow game names with spaces#474
nicolodavis merged 4 commits into
boardgameio:masterfrom
jasonharrison:GH-459

Conversation

@jasonharrison
Copy link
Copy Markdown
Contributor

@jasonharrison jasonharrison commented Sep 26, 2019

Fix #459 by throwing an error when encountering a game name with spaces.

Checklist

  • Use a separate branch in your local repo (not master).
  • Test coverage is 100% (or you have a story for why it's ok).

Copy link
Copy Markdown
Member

@nicolodavis nicolodavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we do this instead?

  • We just log an error if the game name is malformed (i.e. it contains spaces).
  • We don't try to automatically fix this for people.

That way we only need to change stuff in game.js and the API stuff is automatically taken care of because a name mismatch will result in the game not being found anyway.

Comment thread src/core/game.js Outdated
Comment thread src/server/api.ts Outdated
@jasonharrison jasonharrison changed the title WIP trying to fix #459 by replacing spaces in game names with dashes Disallow game names with spaces Sep 30, 2019
@nicolodavis nicolodavis merged commit 64971ee into boardgameio:master Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi word game name with Title Case causes indefinite connecting... in Lobby

2 participants