You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So much code with stacked if and else if statements,
a-lot of re-used code that could be put in separate reuseable function.
a-lot of JavaScript array filtering instead of using mongoose queries.
there is a route for player joining and player moving, all of that used to be in one function, but I thought it was messy, but now that they're separate I think it just added a-lot more code.
a lot of validation logic handled in the controllers, but should be middleware instead.
tips
instead of javascript.filter, use mongoose operators such as $in, findOne, and find, also instead of recreating an array, you can use $set.
The text was updated successfully, but these errors were encountered:
Refactor
tips
instead of javascript.filter, use mongoose operators such as $in, findOne, and find, also instead of recreating an array, you can use $set.
The text was updated successfully, but these errors were encountered: