More work with subscriptions

This commit is contained in:
vjrj 2017-12-18 03:16:06 +01:00
parent 918103a17b
commit 497724443f
11 changed files with 164 additions and 62 deletions

View file

@ -37,7 +37,7 @@ Meteor.publishTransformed('userSubsToFires', function transform() {
});
});
Meteor.publish('subscriptions', function subscriptions() {
Meteor.publish('mysubscriptions', function subscriptions() {
return Subscriptions.find({ owner: this.userId });
});

View file

@ -6,7 +6,10 @@ import { defaultCreatedAt, defaultUpdateAt } from '/imports/api/Utility/Utils.js
import i18n from 'i18next';
const schemaUserProfile = new SimpleSchema({
name: { type: String, optional: true },
// name: { type: String, optional: true },
name: Object,
'name.first': String,
'name.last': String,
lang: { type: String, optional: true },
telegramChatId: { type: Number, optional: true },
telegramUsername: { type: String, optional: true },

View file

@ -11,7 +11,8 @@ export const defaultCreatedAt = {
}
// Prevent user from supplying their own value
this.unset();
}
},
optional: true // TODO: Use migration for users
};
export const defaultUpdateAt = {