Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Step 21.24: Implement publications of Images and Thumbs
  • Loading branch information
dotansimha committed Nov 27, 2016
1 parent cdb7849 commit 81c77aa
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 81c77aa

Please sign in to comment.