Merged conflicts

This commit is contained in:
Dan Zajdband
2016-11-15 12:40:48 -05:00
2 changed files with 6 additions and 5 deletions
+3 -1
View File
@@ -38,12 +38,14 @@ export default function community (state = initialState, action) {
})
.set('commenters', commenters); // Sets to normal array
}
case SET_ROLE :
case SET_ROLE : {
const commenters = state.get('commenters');
const idx = commenters.findIndex(el => el.id === action.id);
commenters[idx].roles[0] = action.role;
return state.set('commenters', commenters.map(id => id));
return state.set('commenters', commenters);
}
case SORT_UPDATE :
return state
.set('field', action.sort.field)
+3 -4
View File
@@ -24,10 +24,9 @@ const UserSchema = new mongoose.Schema({
required: true
}
}],
roles: {
type: [{ type: String, enum: ['admin', 'moderator'] }],
}
roles: {
type: [{type: String, enum: ['admin', 'moderator']}]
}
}, {
timestamps: {
createdAt: 'created_at',