added stale

This commit is contained in:
Sendou 2020-05-29 11:13:18 +03:00
parent c407266021
commit c62af86dcb
3 changed files with 4 additions and 1 deletions

View File

@ -36,6 +36,7 @@ export interface UsersForVotingData {
score: number
month: number
year: number
stale: boolean
}[]
}
}
@ -75,6 +76,7 @@ export const USERS_FOR_VOTING: DocumentNode = gql`
score
month
year
stale
}
}
}

View File

@ -539,6 +539,7 @@ const resolvers = {
year,
plus_server,
score: vote.score,
stale: false,
}))
await VotedPerson.insertMany(toInsert)

View File

@ -7,7 +7,7 @@ const votedPersonSchema = new mongoose.Schema({
month: { type: Number, required: true },
year: { type: Number, required: true },
plus_server: { type: String, required: true },
stale: { type: Boolean, default: false },
stale: Boolean,
})
votedPersonSchema.virtual("discord_user", {