mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-28 19:45:45 +08:00
fixbugs
This commit is contained in:
@@ -24,9 +24,14 @@ exports.calcBilling = (account, isForce, callback) ->
|
||||
|
||||
amount += price * billing_time
|
||||
|
||||
if isForce
|
||||
new_last_billing_at = new Date()
|
||||
else
|
||||
new_last_billing_at = new Date account.attribute.last_billing_at.getTime() + billing_time * 3600 * 1000
|
||||
|
||||
modifier =
|
||||
$set:
|
||||
'attribute.last_billing_at': new Date account.attribute.last_billing_at.getTime() + billing_time * 3600 * 1000
|
||||
'attribute.last_billing_at': new_last_billing_at
|
||||
$inc:
|
||||
'attribute.balance': -amount
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports =
|
||||
t_name: '所有服务(默认)'
|
||||
t_service: '支持所有服务'
|
||||
t_resources: '磁盘: 520MB, 内存: 27MB, 流量: 37GB'
|
||||
services: ['linux', 'ssh', 'phpfpm', 'mysql']
|
||||
services: ['linux', 'ssh', 'phpfpm', 'mysql', 'nginx']
|
||||
resources:
|
||||
cpu: 144
|
||||
storage: 520
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports =
|
||||
callback()
|
||||
|
||||
delete: (account, callback) ->
|
||||
if attribute.plugin.phpfpm.is_enable
|
||||
if account.attribute.plugin.phpfpm.is_enable
|
||||
this.switch account, callback
|
||||
else
|
||||
callback()
|
||||
|
||||
Reference in New Issue
Block a user