mirror of
https://github.com/vale981/Vulcan
synced 2025-03-11 21:16:40 -04:00
28 lines
No EOL
522 B
JavaScript
28 lines
No EOL
522 B
JavaScript
/*
|
|
|
|
Comments views
|
|
|
|
*/
|
|
|
|
import Comments from './index.js';
|
|
|
|
// will be common to all other view unless specific properties are overwritten
|
|
Comments.addDefaultView(function (terms) {
|
|
return {
|
|
options: {limit: 1000}
|
|
};
|
|
});
|
|
|
|
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}}
|
|
};
|
|
}); |