Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
DesertsPan committed Sep 18, 2018
1 parent b167fd5 commit feab93e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cloud.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const AV = require('leanengine');
const mail = require('./utilities/send-mail');
const Comment = AV.Object.extend('Comment');
const request = require('request');

function sendNotification(currentComment) {
// 发送博主通知邮件
Expand Down Expand Up @@ -53,3 +54,10 @@ AV.Cloud.define('resend-mails', function(request) {
});
});
});

AV.Cloud.define('self-wake', function(request) {
request(process.env.ADMIN_URL, function (error, response, body) {
console.log('自唤醒任务执行成功,响应状态码为:', response && response.statusCode);
});
})

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"express": "4.12.3",
"leancloud-storage": "^3.0.0",
"leanengine": "^3.0.0",
"nodemailer": "^4.0.1"
"nodemailer": "^4.0.1",
"requests": "^0.2.2"
},
"devDependencies": {
"nodemon": "^1.11.0"
Expand Down

0 comments on commit feab93e

Please sign in to comment.