public IActionResult Login([FromBody] LoginDTO loginDTO)
        {
            var result = userLib.ValidateLogin(loginDTO);

            if (result == 1)
            {
                var user      = userLib.GetUser(loginDTO.UserName);
                var jwtHelper = new JWTHelper();
                var token     = jwtHelper.GenerateToken(user.Id, user.Roles, user.Name, user.CompanyId);
                return(webAPIHelper.CreateResponse(token));
            }
            return(webAPIHelper.CreateResponse(result));
        }