This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| noti.sendLoanOrderSuccess = function(loanOrder, cb) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Recipients of notificaton about new loan registered on website. | |
| * @type Object.<string, string> | |
| */ | |
| templates: { | |
| 'success-order-loan': { | |
| from: 'boria1966@gmail.com', | |
| to: 'boria1966@gmail.com', | |
| subjectJade: '| Новая заявка на заем #{id}, #{city}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var schema = new mongoose.Schema({ | |
| stage: { type: Number, default: 1 }, | |
| phone: { type: String, required: true }, | |
| phoneExtra: { type: 'Mixed'}, // Dadata extended data | |
| loan: { type: Number, min: 1000, max: 17000 }, // Amount of desired money | |
| term: { type: Number, min: 1, max: 17}, // Term of the loan in days | |
| city: { type: 'ObjectId', ref: 'City'}, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| /** | |
| * Recipients of notificaton about new loan registered on website. | |
| * Subject is parsed by jade | |
| */ | |
| 'success-order-loan': { | |
| from: 'boria1966@gmail.com', | |
| to: 'boria1966@gmail.com', | |
| subject: '| Новая заявка на заем #{id}, #{city}' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Email.send = function(templateName, templateData, options, cb) { | |
| emailTemplates(derp.settings.noti.templatesDir, function(err, template) { | |
| if (err) { return cb(err) } | |
| var transport = nodemailer.createTransport(_.result(derp.settings.noti.emailTransport)) | |
| template(templateName, templateData, function(err, html, text) { | |
| if (err) { return cb(err) } | |
| var templates = require(__dirname + '/../../' + derp.settings.noti.templatesDir + '/templates.js') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| var service = module.exports = {}, | |
| derp = require('derp'), | |
| _ = require('lodash'), | |
| settings = derp.settings | |
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Email.send = function(templateName, templateData, options, cb) { | |
| emailTemplates(__dirname + "/../../" + derp.settings.noti.templatesDir, function(err, template) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service.miscAndConfirm = function (orderId, attributes, done) { | |
| var Order = derp.db.model('Order'); | |
| service.getById(orderId, { | |
| stage: Order.STAGE.JOB | |
| }, function (err, loanOrder) { | |
| if (err) { return done(err); } | |
| loanOrder.set({ | |
| loan: attributes.loan, | |
| term: attributes.term, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stream rdpromo_site { | |
| server localhost:8000; | |
| } | |
| server { | |
| listen 80; | |
| server_name local.ros-dengi.ru; | |
| location ~ ^/(vendors/|css/|img/|fonts/|download/) { | |
| root /home/junior/code/rdpromo-site/public; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| schema.virtual('loan.id').get(function() { | |
| return new Date(this.get('_created')).getTime() | |
| }) |
OlderNewer