Communication with the database should probably be limited to our controller functions (rest APIs). Since we don't know when using this function whether the player already exists, we should use POST to route it from routes/player.js. If we do not want to make this url available to communicate we can simply not route it, and leave the function in the controller for server use only.
Communication with the database should probably be limited to our controller functions (rest APIs). Since we don't know when using this function whether the player already exists, we should use POST to route it from routes/player.js. If we do not want to make this url available to communicate we can simply not route it, and leave the function in the controller for server use only.