Added false positives management to website

This commit is contained in:
vjrj 2018-01-29 19:23:05 +01:00
parent 379e72a9e7
commit 674c07460b
10 changed files with 192 additions and 29 deletions

View file

@ -0,0 +1,37 @@
/* eslint-disable consistent-return */
import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import SimpleSchema from 'simpl-schema';
import { defaultCreatedAt, defaultUpdateAt } from '/imports/api/Utility/Utils.js';
import LocationSchema from '/imports/api/Utility/LocationSchema.js';
const FalsePositives = new Mongo.Collection('falsePositives', { idGeneration: 'MONGO' });
FalsePositives.allow({
insert: () => false,
update: () => false,
remove: () => false
});
FalsePositives.deny({
insert: () => true,
update: () => true,
remove: () => true
});
FalsePositives.schema = new SimpleSchema({
geo: LocationSchema,
fireId: { type: Meteor.Collection.ObjectID, optional: true, blackbox: true },
chatId: { type: Number, optional: true }, // only in 'telegram' type
owner: String,
type: String,
when: Date,
whendateformat: String,
createdAt: defaultCreatedAt,
updatedAt: defaultUpdateAt
});
FalsePositives.attachSchema(FalsePositives.schema);
export default FalsePositives;