在不影响原功能代码的情况下,增加了一些本机,VPS部署,或者docker构建的一些文件#60
Open
iouAkira wants to merge 1 commit into
Open
Conversation
- send-notification.js 这个文件主要根据repo 里面 ./utilities/send-mail.js 和 cloud.js 里面提取出来改造成一个专门给crontab 做定时任务发送通知邮件用的。因为这个文件单独执行所以,没有原Comment表的更新权限,所以这里单独将发送通知记录到一张新的Notifications表。 - ./routes/comment.js 这文件里面增加了 updateCommentByNotifications 方法用,因为这里是管理员登录后台了,有权限更新Comment表了。为了不影响其他模块的,所以这里就会根据Notifications表的发送记录,把Comment表的isNotified更新为true。
Owner
|
思路不错 |
Author
@DesertsP 本来想合进去的,感觉好像没什么人有这个需求,我不会Nodejs也是模仿着改的,代码写的也不行,所以提了PR又关了😂,如果有人有这个需求你可以考虑合进去。 |
|
@iouAkira 太赞了,我刚好想把它封装成 Docker 镜像,没想到你已经做了,赞 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
send-notification.js这个文件主要根据repo 里面./utilities/send-mail.js和cloud.js里面提取出来改造成一个专门给crontab 做定时任务发送通知邮件用的。因为这个文件单独执行所以,没有原Comment表的更新权限,所以这里单独将发送通知记录到一张新的Notifications表。./routes/comment.js这文件里面增加了updateCommentByNotifications方法,因为这里是管理员登录后台了,有权限更新Comment表了。为了不影响其他模块的,所以这里就会根据Notifications表的发送记录,把Comment表的isNotified更新为true。