mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-02-28 01:00:59 +01:00
opt(announce): optimization announce data with vip
fixed USER_VIP_CHANGED_ADD string remove all h&r warning when user got a vip month vip download failed tooltip clean on seeder side #20
This commit is contained in:
@@ -392,6 +392,7 @@ exports.addVIPMonths = function (req, res) {
|
||||
user.vip_start_at = start;
|
||||
user.vip_end_at = end;
|
||||
user.status = 'normal';
|
||||
user.hnr_warning = 0;
|
||||
|
||||
user.save(function (err) {
|
||||
if (err) {
|
||||
@@ -402,6 +403,11 @@ exports.addVIPMonths = function (req, res) {
|
||||
|
||||
res.json(user);
|
||||
|
||||
//clean all H&R record
|
||||
Complete.remove({
|
||||
user: user._id
|
||||
}).exec();
|
||||
|
||||
//add server message
|
||||
if (serverNoticeConfig.action.userVipStatusChanged.enable) {
|
||||
serverMessage.addMessage(user._id, serverNoticeConfig.action.userVipStatusChanged.title, serverNoticeConfig.action.userVipStatusChanged.content, {
|
||||
|
||||
Reference in New Issue
Block a user