Improved rest api calls
This commit is contained in:
parent
5b3d86e6a5
commit
5642b106d4
4 changed files with 45 additions and 8 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/* eslint-disable consistent-return */
|
||||
/* eslint-disable import/no-absolute-path */
|
||||
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import { defaultCreatedAt, defaultUpdateAt } from '/imports/api/Utility/Utils.js';
|
||||
|
|
@ -42,6 +43,7 @@ Subscriptions.deny({
|
|||
|
||||
|
||||
Subscriptions.schema = new SimpleSchema({
|
||||
_id: { type: Meteor.Collection.ObjectID, optional: true, blackbox: true },
|
||||
location: Object,
|
||||
'location.lat': Number,
|
||||
'location.lon': Number,
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ function geo(doc) {
|
|||
|
||||
export function subscriptionsInsert(doc, userId, type) {
|
||||
check(doc, {
|
||||
_id: Match.Maybe(Meteor.Collection.ObjectID),
|
||||
location: Match.ObjectIncluding({ lat: Number, lon: Number }),
|
||||
distance: Number
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue