diff --git a/imports/api/userLog/userLog.js b/imports/api/userLog/userLog.js index 8878feb5..ddd614ac 100644 --- a/imports/api/userLog/userLog.js +++ b/imports/api/userLog/userLog.js @@ -1,7 +1,7 @@ // Colletion to hold all user log entries import { Mongo } from 'meteor/mongo'; -import SimpleSchema from 'simpl-schema'; +import { Meteor } from 'meteor/meteor'; export const UserLog = new Mongo.Collection('user_log'); @@ -11,11 +11,6 @@ UserLog.deny({ remove() { return true; }, }); -const userLogSchema = new SimpleSchema({ - userid: { type: String, index: true }, - action: { type: String, index: true }, - message: { type: String, required: true }, - created: { type: Date, required: true, }, -}); - -UserLog.attachSchema(userLogSchema); \ No newline at end of file +if ( Meteor.isServer ) { + UserLog._ensureIndex( { 'userid': 1, 'action': 1} ); +}