todos-contra-el-fuego-web/imports/api/Notifications/server/publications.js
2018-01-22 13:27:46 +01:00

10 lines
382 B
JavaScript

/* eslint-disable prefer-arrow-callback */
import { Meteor } from 'meteor/meteor';
import Notifications from '../Notifications';
Meteor.publish('mynotifications', function notifications() {
const notif = Notifications.find({ userId: this.userId, type: 'web', webNotified: null });
// console.log(`Notifications for user ${this.userId}: ${notif.count()}`);
return notif;
});