Latest bits

This commit is contained in:
Dobie Wollert
2015-06-29 00:45:40 -04:00
parent b80f326ec2
commit 0d5ebb3f43
12 changed files with 241 additions and 29 deletions

View File

@ -6,7 +6,7 @@ var mongoose = require('mongoose'),
var log = require('log4node');
var frequencies = ["Medical Device","Sterilizer - TT","Vaporizer","Ice Maker","Anesthesia","Waste Management System","Imaging","Medical Gas Systems","RAE","ERT","N2O Trace Gas","Sterilizer - F","Quarterly","Semi","Annual","legacy","DLLR", "Isolation Panel", "Battery Backup"];
var frequencies = ["Medical Device","Sterilizer - TT","Vaporizer","Ice Maker","Anesthesia","Waste Management System","Imaging","Medical Gas Systems","RAE","ERT","N2O Trace Gas","Sterilizer - F","Quarterly","Semi","Annual","legacy","DLLR", "Isolation Panel", "Battery Backup", "Sterilizer - Cleaning"];
exports.index = function(req, res) {
log.info("clients.index");

View File

@ -14,13 +14,11 @@ module.exports = function(config) {
return {
send: function(req, res) {
console.log(req);
var userId = req.body.user;
if (!userId) {
return res.json(404, null);
}
console.log("Sending message");
User.findById(userId, function(err, user) {
if (err) return res.json(500, err);

View File

@ -43,7 +43,6 @@ function renderHtml(input) {
try {
return markdown.toHTML(input);
} catch (err) {
console.log('Failed to render html', err);
return input;
}
} else {
@ -108,8 +107,6 @@ exports.create = function(req, res, next) {
exports.update = function(req, res, next) {
var id = req.param('post_id');
console.log('updating post');
return Post.findById(id, function(err, post) {
post.title = req.body.title;
post.preview = req.body.preview;

View File

@ -139,9 +139,6 @@ module.exports = function(config, calendar) {
var subject = 'Workorder created: ' + workorder.biomedId;
console.log('-------------------------');
console.log(to);
async.waterfall([
function(cb) {
if (to && to.length > 0) {
@ -151,7 +148,6 @@ module.exports = function(config, calendar) {
to: to,
subject: subject
};
console.log(msg);
server.send(msg, function(err, message) { cb(err); });
} else {
cb();
@ -165,7 +161,6 @@ module.exports = function(config, calendar) {
to: techTo,
subject: subject
};
console.log(msg);
server.send(msg, function(err, message) { cb(err); });
} else {
cb();
@ -318,7 +313,6 @@ module.exports = function(config, calendar) {
to: to,
subject: subject
};
console.log(msg);
server.send(msg, function(err, message) { cb(err); });
} else {
cb();
@ -332,7 +326,6 @@ module.exports = function(config, calendar) {
to: techTo,
subject: subject
};
console.log(msg);
server.send(msg, function(err, message) { cb(err); });
} else {
cb();