Rewire upvote to use post and req.body instead of req.params, add logic on click handler to reject upvotes if the user has already upvoted, coment display now works
This commit is contained in:
@@ -6,11 +6,15 @@ var commentSchema = new mongoose.Schema({
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
body: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
rank: {
|
||||
type: Number,
|
||||
default: -Infinity
|
||||
},
|
||||
upVotes: {
|
||||
upvotes: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
|
Reference in New Issue
Block a user