From 5f389f52948ecce99c42aebb6a0444a88cf26874 Mon Sep 17 00:00:00 2001 From: C4 Patino Date: Thu, 18 Aug 2022 14:35:05 -0400 Subject: [PATCH] Completed badges --- server/badges.json | 64 +++++++++++++++++++++++++++++++++++++++ server/db/models/Badge.js | 2 +- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 server/badges.json diff --git a/server/badges.json b/server/badges.json new file mode 100644 index 0000000..ddeb065 --- /dev/null +++ b/server/badges.json @@ -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" + } + ] +} diff --git a/server/db/models/Badge.js b/server/db/models/Badge.js index 7b9b7b7..7076d4a 100644 --- a/server/db/models/Badge.js +++ b/server/db/models/Badge.js @@ -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);