Skip to content

Stop accessing mongo from the client #11

@PeterGerrard

Description

@PeterGerrard

There are bits of code in the client like:

Games.update(gameID, {$set: {state: 'nightTime', deaths: [], injuries: []}});

For a prototype this is fine, but longer term it would be preferable to have a cleaner api where onlt the server can access mongo. There are two main reasons:

  • All the state modification code lives in one place making it easier to reason about
  • Allows you to put checks in ensuring there isn't a vote on before starting nighttime. Currently this relies on the sleep button not being present on the ui.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code improvementwon't necessarily enhance the functionality, but will make for better code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions