Added false positives management to website
This commit is contained in:
parent
379e72a9e7
commit
674c07460b
10 changed files with 192 additions and 29 deletions
|
|
@ -9,7 +9,7 @@ Comments.config({
|
|||
profile: 1
|
||||
},
|
||||
generateUsername: function genUser(user) {
|
||||
console.log(JSON.stringify(user));
|
||||
// console.log(JSON.stringify(user));
|
||||
// FIXME
|
||||
return user.profile && user.profile.name && user.profile.name.first ? user.profile.name.first : '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,3 +24,5 @@ import '../../api/Fires/server/publications';
|
|||
|
||||
import '../../api/SiteSettings/methods';
|
||||
import '../../api/SiteSettings/server/publications';
|
||||
|
||||
import '../../api/FalsePositives/methods';
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import randomHex from 'crypto-random-hex';
|
|||
import UserSubsToFiresCollection from '/imports/api/Subscriptions/Subscriptions';
|
||||
import FireAlertsCollection from '/imports/api/FireAlerts/FireAlerts';
|
||||
import SiteSettings from '/imports/api/SiteSettings/SiteSettings';
|
||||
import FalsePositives from '/imports/api/FalsePositives/FalsePositives';
|
||||
|
||||
Meteor.startup(() => {
|
||||
// https://github.com/percolatestudio/meteor-migrations
|
||||
|
|
@ -92,6 +93,17 @@ Meteor.startup(() => {
|
|||
}
|
||||
});
|
||||
|
||||
Migrations.add({
|
||||
version: 6,
|
||||
up: function falsePositiveIndexes() {
|
||||
FalsePositives._ensureIndex({ chatId: 1 });
|
||||
FalsePositives._ensureIndex({ owner: 1 });
|
||||
FalsePositives._ensureIndex({ fireId: 1 });
|
||||
FalsePositives._ensureIndex({ type: 1 });
|
||||
FalsePositives._ensureIndex({ geo: '2dsphere' });
|
||||
}
|
||||
});
|
||||
|
||||
// Set createdAt in users & subs
|
||||
Migrations.migrateTo('latest');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue