From 1540e4e5293e2caf1cd705eb4b0f978298eeb56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Str=C3=A4tz?= Date: Wed, 17 Sep 2014 21:11:59 +0200 Subject: [PATCH] Fixed regression --- collections/posts.js | 6 ++++-- collections/settings.js | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/collections/posts.js b/collections/posts.js index e997f9174..7aba28238 100644 --- a/collections/posts.js +++ b/collections/posts.js @@ -1,4 +1,4 @@ -PostSchema = new SimpleSchema({ +postSchemaObject = { _id: { type: String, optional: true @@ -86,7 +86,7 @@ PostSchema = new SimpleSchema({ type: String, // XXX optional: true } -}); +}; // add any extra properties to postSchemaObject (provided by packages for example) _.each(addToPostSchema, function(item){ @@ -94,6 +94,8 @@ _.each(addToPostSchema, function(item){ }); Posts = new Meteor.Collection("posts"); + +PostSchema = new SimpleSchema(postSchemaObject); Posts.attachSchema(PostSchema); STATUS_PENDING=1; diff --git a/collections/settings.js b/collections/settings.js index 0339d5347..a40a3e837 100644 --- a/collections/settings.js +++ b/collections/settings.js @@ -1,4 +1,4 @@ -SettingSchema = new SimpleSchema({ +settingsSchemaObject = { title: { type: String, label: "Title", @@ -160,7 +160,7 @@ SettingSchema = new SimpleSchema({ type: String, optional: true } -}); +}; // add any extra properties to settingsSchemaObject (provided by packages for example) _.each(addToSettingsSchema, function(item){ @@ -168,6 +168,7 @@ _.each(addToSettingsSchema, function(item){ }); Settings = new Meteor.Collection("settings"); +SettingSchema = new SimpleSchema(settingsSchemaObject); Settings.attachSchema(SettingsSchema); Settings.allow({