Conversation
|
Poking around in the code and notice that Should fix that before this PR is merged. Edit: this has been fixed with |
|
It was done because it's expedient, since you can just add |
|
Blah. That really messes up what i'm trying to do. I'm trying to think of a way to solve this without making a new model for match. |
|
Okay. If we add winnerTeam and loserTeam to match model which references teams ID, this should work. |
|
Okay, updated match delete to work with teams games. I'm going to do some of the front end work in this PR while I wait for a code review. |
|
Do you think it's possible (or maybe a better way to ask this, what is the effort level) to just make |
There was a problem hiding this comment.
Does this work for null values? Like, if it's a team game, winner and loser will be empty, right? Maybe (for clarity) we want to separate these out, so that you only ever get regular matches OR team matches, but not a mix of both. Something like Match.prototype.teamMatch?
There was a problem hiding this comment.
Yes, this works on NULL values. The reason I don't want to separate the logic out, is because I thought it would make it overly complicated. ((match.js is all ready hard to understand in some places))
Maybe i'll add a comment or two where .populate are
|
Looks good - though I don't understand why winnerTeam and loserTeam are arrays. But other than that (and maybe even with that), I think this is ready. 👍 |
|
Updated the code. winnerTeam and loserTeam should not be arrays. And delete match has been cleaned up a bit. Since I have almost all of the front-end work done in this PR, I think i'm going to try and finished it before this is merge. |
|
I know this has been inactive for a while, but I'm curious if the team ability is functioning? |
|
@danielxhenson I believe it was mostly working. I think there was still one or two bugs with the scoring. Feel free to fork it and see if it works! |
Things done so far: