Add math.floor() function call to setHighLevel()
This commit is contained in:
parent
9bf68a499b
commit
af982f8611
|
|
@ -14,6 +14,9 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.*/
|
||||
|
||||
//NPM imports
|
||||
const validator = require('validator')
|
||||
|
||||
//local imports
|
||||
const commandPreprocessor = require('./commandPreprocessor');
|
||||
const loggerUtils = require('../../utils/loggerUtils');
|
||||
|
|
@ -63,8 +66,8 @@ module.exports = class{
|
|||
|
||||
if(userDB){
|
||||
try{
|
||||
//Set high level
|
||||
userDB.highLevel = data.highLevel;
|
||||
//Floor input to an integer and set high level
|
||||
userDB.highLevel = Math.floor(data.highLevel);
|
||||
//Save user DB Document
|
||||
await userDB.save();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue