Skip to content

Conversation

@johnmeshulam
Copy link
Member

No description provided.

Comment on lines +20 to +35
const defaultDeliberation: Omit<FinalDeliberation, 'divisionId'> = {
stage: 'champions',
status: 'not-started',
startTime: null,
completionTime: null,
awards: {},
stageData: {}
};

const result = await this.mongoDb
.collection<FinalDeliberation>(COLLECTION_NAME)
.findOneAndUpdate(
{ divisionId: this.divisionId },
{ $set: { ...defaultDeliberation, ...updates } },
{ upsert: true, returnDocument: 'after' }
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is giga-bad, pls fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants