Completed badges

This commit is contained in:
Ceferino Patino 2022-08-18 14:35:05 -04:00
commit 5f389f5294
2 changed files with 65 additions and 1 deletions

64
server/badges.json Normal file
View file

@ -0,0 +1,64 @@
{
"badges": [
{
"title": "Great Question",
"text": "Have a question with net total points of >100",
"rank": "Gold"
},
{
"title": "Good Question",
"text": "Have a question with net total points of >25",
"rank": "Silver"
},
{
"title": "Nice Question",
"text": "Have a question with net total points of >10",
"rank": "Bronze"
},
{
"title": "Great Answer",
"text": "Have a answer with net total points of >100",
"rank": "Gold"
},
{
"title": "Good Answer",
"text": "Have a answer with net total points of >25",
"rank": "Silver"
},
{
"title": "Nice Answer",
"text": "Have a answer with net total points of >10",
"rank": "Bronze"
},
{
"title": "Socratic",
"text": "Have at least 10000 points",
"rank": "Gold"
},
{
"title": "Inquisitive",
"text": "Have at least 3000 points",
"rank": "Silver"
},
{
"title": "Curious",
"text": "Have at least 100 points",
"rank": "Bronze"
},
{
"title": "Zombie",
"text": "Have a question that is reopened",
"rank": "Gold"
},
{
"title": "Protected",
"text": "Have a question that is protected",
"rank": "Silver"
},
{
"title": "Scholar",
"text": "Accept an answer",
"rank": "Bronze"
}
]
}

View file

@ -3,7 +3,7 @@ const mongoose = require('mongoose');
const Badge = mongoose.Schema({
title: { type: String, required: true },
text: { type: String, required: true },
rank: { type: String, required: true },
rank: { type: String, required: true, enum: ['Gold', 'Silver', 'Bronze'] },
});
module.exports = mongoose.model('Badge', Badge);