mirror of
https://github.com/wassname/talk.git
synced 2026-07-11 21:43:56 +08:00
Linting Issues
This commit is contained in:
@@ -38,12 +38,13 @@ 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);
|
||||
}
|
||||
case SORT_UPDATE :
|
||||
return state
|
||||
.set('field', action.sort.field)
|
||||
|
||||
+3
-4
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user