From 91582f351c6182c646e548be68fb89b20f9de2ac Mon Sep 17 00:00:00 2001 From: Point5Nyble Date: Sun, 30 Jun 2024 13:27:21 +0530 Subject: [PATCH] update to make sure save values as int32 --- routes/tenants-endpoint.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/tenants-endpoint.js b/routes/tenants-endpoint.js index 0c7710d..318e308 100644 --- a/routes/tenants-endpoint.js +++ b/routes/tenants-endpoint.js @@ -52,7 +52,7 @@ router.route("/add").post(async function (req, res) { website: website, endDate: endDate, allowedDiskSpace: allowedDiskSpace === undefined ? 10 : allowedDiskSpace, - allowedCustomFormCount:allowedCustomFormCount, + allowedCustomFormCount:allowedCustomFormCount===undefined?0:allowedCustomFormCount, mobileUserCount: mobileUserCount === undefined ? 0 : mobileUserCount, webUserCount: webUserCount === undefined ? 0 : webUserCount, bothUserCount: bothUserCount === undefined ? 0 : bothUserCount, @@ -322,7 +322,7 @@ router.route("/:id/increasetenantusers/:count").post(async function (req, res) { try { var errResponse; const tenantId = req.params.id; - const count = req.params.count; + const count = parseInt(req.params.count); var result = await TenantService.increaseTenantUsers(tenantId, count); if (result.reason) { @@ -340,7 +340,7 @@ router.route("/:id/increasecustomformcount/:count").post(async function (req, re try { var errResponse; const tenantId = req.params.id; - const count = req.params.count; + const count = parseInt( req.params.count); var result = await TenantService.increaseAllowedCustomForms(tenantId, count); if (result.reason) {