Commit 860bc462 authored by Marc-Andre Lafortune's avatar Marc-Andre Lafortune

Update meteor

parent 81581d7f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Todos = new Meteor.Collection('todos'); Todos = new Meteor.Collection('todos');
// JS code for the client (browser) // JS code for the client (browser)
if (Meteor.is_client) { if (Meteor.isClient) {
// Session var to keep current filter type ("all", "active", "completed") // Session var to keep current filter type ("all", "active", "completed")
Session.set('filter', 'all'); Session.set('filter', 'all');
...@@ -197,18 +197,18 @@ if (Meteor.is_client) { ...@@ -197,18 +197,18 @@ if (Meteor.is_client) {
} }
//Publish and subscribe setting //Publish and subscribe setting
if (Meteor.is_server) { if (Meteor.isServer) {
Meteor.publish('todos', function () { Meteor.publish('todos', function () {
return Todos.find(); return Todos.find();
}); });
} }
if (Meteor.is_client) { if (Meteor.isClient) {
Meteor.subscribe('todos'); Meteor.subscribe('todos');
} }
//Allow users to write directly to this collection from client code, subject to limitations you define. //Allow users to write directly to this collection from client code, subject to limitations you define.
if (Meteor.is_server) { if (Meteor.isServer) {
Todos.allow({ Todos.allow({
insert: function () { insert: function () {
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment