public IActionResult updateCategory([FromBody] TblCategoryDTO categoryDTO)
        {
            bool isValidToken = ValidateToken();

            if (isValidToken)
            {
                TblCategoryDAO dao = new TblCategoryDAO();
                try
                {
                    if (dao.update(categoryDTO))
                    {
                        return(Ok(categoryDTO));
                    }
                }
                catch (Exception e)
                {
                    return(StatusCode(500));
                }
            }
            return(Unauthorized());
        }
        public IActionResult loadCategory()
        {
            bool isValidToken = ValidateToken();

            if (isValidToken)
            {
                TblCategoryDAO dao = new TblCategoryDAO();
                try
                {
                    List <TblCategoryDTO> listCategory = dao.loadCategory();
                    if (listCategory != null)
                    {
                        return(Ok(listCategory));
                    }
                }
                catch (Exception)
                {
                    StatusCode(500);
                }
            }
            return(Unauthorized());
        }