mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
Latest bits
This commit is contained in:
@ -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");
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user