@xuda.io/account_module 1.2.91 → 1.2.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +7 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1456,6 +1456,7 @@ exports.validate_account_topup = async function (uid, items = []) {
1456
1456
 
1457
1457
  if (data?.balance?.past_due) {
1458
1458
  let err = new Error(`past_due ${data?.balance?.past_due}`);
1459
+ err.code = -91;
1459
1460
  err.billing_problem = true;
1460
1461
  err.topup = topup;
1461
1462
  throw err;
@@ -1465,6 +1466,7 @@ exports.validate_account_topup = async function (uid, items = []) {
1465
1466
 
1466
1467
  if (balance > 0) {
1467
1468
  let err = new Error(`negative balance ${-balance}`);
1469
+ err.code = -92;
1468
1470
  err.billing_problem = true;
1469
1471
  err.topup = topup - balance; // ask for whole balance
1470
1472
  throw err;
@@ -1472,6 +1474,7 @@ exports.validate_account_topup = async function (uid, items = []) {
1472
1474
 
1473
1475
  if (topup + balance > 0) {
1474
1476
  let err = new Error(`not enough balance ${topup + balance}`);
1477
+ err.code = -93;
1475
1478
  err.billing_problem = true;
1476
1479
  err.topup = topup;
1477
1480
  throw err;
@@ -1522,6 +1525,10 @@ const get_prices = function (uid, item) {
1522
1525
  price = _conf.PRICE_OBJ.branding_per_month;
1523
1526
  break;
1524
1527
 
1528
+ case "utility_screen":
1529
+ price = _conf.PRICE_OBJ.utility_screen_per_month;
1530
+ break;
1531
+
1525
1532
  default:
1526
1533
  price = 0;
1527
1534
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.91",
3
+ "version": "1.2.93",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {