Vulcan/packages/example-forum/lib/modules/comments/views.js
2017-09-15 10:08:23 +02:00

21 lines
No EOL
352 B
JavaScript

/*
Comments views
*/
import Comments from './index.js';
Comments.addView('postComments', function (terms) {
return {
selector: {postId: terms.postId},
options: {sort: {postedAt: -1}}
};
});
Comments.addView('userComments', function (terms) {
return {
selector: {userId: terms.userId},
options: {sort: {postedAt: -1}}
};
});