Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/apps/admin/components/ScouterTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function ScouterTable({ scouters }: { scouters: StatusReport[] }) {
) as Record<RobotPosition | SuperPosition, StatusReport[]>;

return (
<div className='grid grid-cols-5 gap-2'>
<div className='grid grid-cols-4 gap-2'>
<ScouterCard scouter={sortedScouter.red_1} title='Red 1' red />
<ScouterCard scouter={sortedScouter.red_2} title='Red 2' red />
<ScouterCard scouter={sortedScouter.red_3} title='Red 3' red />
Expand Down
6 changes: 4 additions & 2 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ setUpSocket(app);
app.post('/data/match', async (req, res) => {
const body = req.body as MatchData;

await new matchApp(body).save();
await matchApp.replaceOne ({ 'metadata.robotTeam' : body.metadata.robotTeam, 'metadata.matchNumber' : body.metadata.matchNumber }, body).setOptions({upsert: true});

updateMatchStatus();
console.log(
chalk.gray(
Expand All @@ -44,7 +45,8 @@ app.post('/data/match', async (req, res) => {
app.post('/data/super', async (req, res) => {
const body = req.body as SuperData;

await new superApp(body).save();
await superApp.replaceOne ({ 'metadata.robotTeam' : body.metadata.robotTeam, 'metadata.matchNumber' : body.metadata.matchNumber }, body).setOptions({upsert: true});

updateMatchStatus();
console.log(
chalk.gray(
Expand Down