mirror of
https://github.com/wassname/talk.git
synced 2026-07-11 23:09:25 +08:00
Updating action type from to for consistency.
This commit is contained in:
+1
-1
@@ -201,7 +201,7 @@ CommentSchema.statics.findByActionType = (action_type) => Action
|
||||
* @return {Promise}
|
||||
*/
|
||||
CommentSchema.statics.findIdsByActionType = (action_type) => Action
|
||||
.findCommentsIdByActionType(action_type, 'comment')
|
||||
.findCommentsIdByActionType(action_type, 'comments')
|
||||
.then((actions) => actions.map(a => a.item_id));
|
||||
|
||||
/**
|
||||
|
||||
@@ -73,12 +73,12 @@ describe('models.Comment', () => {
|
||||
const actions = [{
|
||||
action_type: 'flag',
|
||||
item_id: '3',
|
||||
item_type: 'comment',
|
||||
item_type: 'comments',
|
||||
user_id: '123'
|
||||
}, {
|
||||
action_type: 'like',
|
||||
item_id: '1',
|
||||
item_type: 'comment',
|
||||
item_type: 'comments',
|
||||
user_id: '456'
|
||||
}];
|
||||
|
||||
|
||||
@@ -58,11 +58,11 @@ describe('/api/v1/comments', () => {
|
||||
const actions = [{
|
||||
action_type: 'flag',
|
||||
item_id: 'abc',
|
||||
item_type: 'comment'
|
||||
item_type: 'comments'
|
||||
}, {
|
||||
action_type: 'like',
|
||||
item_id: 'hij',
|
||||
item_type: 'comment'
|
||||
item_type: 'comments'
|
||||
}];
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user