Skip to content

Commit

Permalink
Step 21.24: Implement publications of Images and Thumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and DAB0mB committed Dec 14, 2016
1 parent c1f27f2 commit 4c333a1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions server/imports/publications/images.ts
@@ -0,0 +1,15 @@
import { Meteor } from 'meteor/meteor';
import { Thumbs, Images } from '../../../both/collections/images.collection';

Meteor.publish('thumbs', function(ids: string[]) {
return Thumbs.collection.find({
originalStore: 'images',
originalId: {
$in: ids
}
});
});

Meteor.publish('images', function() {
return Images.collection.find({});
});

0 comments on commit 4c333a1

Please sign in to comment.