Redesigned the querying for the sale duplicates screen to use aggregation; Finished the styling of the sale duplicate screen; Tested the functionality of sale duplicates; Added a way to show hidden (ignored) duplicates.
This commit is contained in:
44
imports/api/Logs.js
Normal file
44
imports/api/Logs.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
|
||||
// The logging tool is primarily for managing administrative functions such that administrators can view the app logs and issue commands that might generate administrative logging.
|
||||
|
||||
Meteor.log = new Logger();
|
||||
Logs = new Mongo.Collection('Logs');
|
||||
|
||||
let logMongo = new LoggerMongo(Meteor.log, {
|
||||
collection: Logs
|
||||
});
|
||||
logMongo.enable({
|
||||
enable: true,
|
||||
client: false, /* Client calls are not executed on the client. */
|
||||
server: true /* Calls from the client will be executed on the server. */
|
||||
});
|
||||
|
||||
if(Meteor.isServer) {
|
||||
Logs._ensureIndex({'date': 1}, {expireAfterSeconds: 86400});
|
||||
Meteor.publish('logs', function() {
|
||||
return Logs.find({}, {limit: 10000});
|
||||
});
|
||||
Meteor.methods({
|
||||
clearLogs: function() {
|
||||
return Logs.remove({}, function(err) {
|
||||
if(err) Meteor.log.error(err);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Logs.allow({
|
||||
insert: () => false,
|
||||
update: () => false,
|
||||
remove: () => false
|
||||
});
|
||||
|
||||
Logs.deny({
|
||||
insert: () => true,
|
||||
update: () => true,
|
||||
remove: () => true
|
||||
});
|
||||
|
||||
export default Logs;
|
||||
Reference in New Issue
Block a user