BYE not working with MongoDB #168
Answered
by
MrEngineerET
MrEngineerET
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
MrEngineerET
Jun 30, 2023
Replies: 4 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Sorry, the issue was from my CRUD implementation.
Then after updating my schema to support a null value, it works
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
MrEngineerET
-
Hello Dear,
I think I have also found an error. If you update the consolidation match
before the final game, the final game gets archived.
```js
await manager.create({
name: 'Example',
tournamentId: 0,
type: 'single_elimination',
seeding: ['Team 1', 'Team 2', 'Team 3', 'Team 4'],
settings: { consolationFinal: true },
});
await manager.update.match({
id: 0,
opponent1: { score: 16, result: 'win' },
opponent2: { score: 12 },
});
await manager.update.match({
id: 1,
opponent1: { score: 16, result: 'win' },
opponent2: { score: 12 },
});
await manager.update.match({
id: 3,
opponent1: { score: 16, result: 'win' },
opponent2: { score: 12 },
});
console.log((await manager.export()).match);
```
Here is the output
```json
[
{
"id": 0,
"number": 1,
"stage_id": 0,
"group_id": 0,
"round_id": 0,
"child_count": 0,
"status": 4,
"opponent1": {
"id": 0,
"position": 1,
"score": 16,
"result": "win"
},
"opponent2": {
"id": 3,
"position": 4,
"score": 12,
"result": "loss"
}
},
{
"id": 1,
"number": 2,
"stage_id": 0,
"group_id": 0,
"round_id": 0,
"child_count": 0,
"status": 4,
"opponent1": {
"id": 1,
"position": 2,
"score": 16,
"result": "win"
},
"opponent2": {
"id": 2,
"position": 3,
"score": 12,
"result": "loss"
}
},
{
"id": 2,
"number": 1,
"stage_id": 0,
"group_id": 0,
"round_id": 1,
"child_count": 0,
"status": 5,
"opponent1": {
"id": 0
},
"opponent2": {
"id": 1
}
},
{
"id": 3,
"number": 1,
"stage_id": 0,
"group_id": 1,
"round_id": 2,
"child_count": 0,
"status": 4,
"opponent1": {
"id": 3,
"position": 1,
"score": 16,
"result": "win"
},
"opponent2": {
"id": 2,
"position": 2,
"score": 12,
"result": "loss"
}
}
]
```
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Thank you very much, I appreciate it.
…On Sat, 1 Jul 2023 at 01:29, Corentin Girard ***@***.***> wrote:
@MrEngineerET <https://github.com/MrEngineerET> a fix was released in
v1.5.10
<https://github.com/Drarig29/brackets-manager.js/releases/tag/v1.5.10>
—
Reply to this email directly, view it on GitHub
<#168 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALIZX7JY7XSCQXSBONZHRM3XN5HLNANCNFSM6AAAAAAZEII2VU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, the issue was from my CRUD implementation.
Earlier my schema for opponents was
Then after updating my schema to support a null value, it works