Fix in IPGeocode (download, and fallback). Schema improvements

This commit is contained in:
vjrj 2018-01-11 12:28:55 +01:00
parent 67a2dfbd42
commit df05b33e82
6 changed files with 77 additions and 11 deletions

View file

@ -1,7 +1,9 @@
/* eslint-disable consistent-return */
/* eslint-disable import/no-absolute-path */
import { Mongo } from 'meteor/mongo';
import SimpleSchema from 'simpl-schema';
import { defaultCreatedAt, defaultUpdateAt } from '/imports/api/Utility/Utils.js';
const Subscriptions = new Mongo.Collection('subscriptions', { idGeneration: 'MONGO' });
@ -74,8 +76,11 @@ Subscriptions.schema = new SimpleSchema({
'location.lon': Number,
geo: LocationSchema,
distance: Number,
chatId: { type: Number, optional: true }, // only in 'telegram' type
owner: String,
type: String
type: String,
createdAt: defaultCreatedAt,
updatedAt: defaultUpdateAt
});
Subscriptions.attachSchema(Subscriptions.schema);