/* eslint-disable import/no-absolute-path */ /* eslint-disable prefer-arrow-callback */ import { Meteor } from 'meteor/meteor'; import { check } from 'meteor/check'; import Comments from '/imports/api/Comments/Comments'; // Comments for one reference (a fire page), oldest first. Meteor.publish('comments.forReference', function commentsForReference(referenceId) { check(referenceId, String); return Comments.find( { referenceId }, { sort: { createdAt: 1 } } ); });