Esempio n. 1
0
        //[Authorize("delete:article")] Disabled authentication for this test
        public IActionResult DeleteArticle(string articleId)
        {
            string deletedId;

            try
            {
                deletedId = _dataController.DeleteArticle(articleId);
            }
            catch (Exception e)
            {
                return(BadRequest(new
                {
                    e.Message
                }));
            }
            return(Json(new
            {
                Message = $"Article ({deletedId}) successfully deleted"
            }));
        }