Ejemplo n.º 1
0
        public async Task <IActionResult> DeleteMy(string id)
        {
            try
            {
                var userId    = Guid.Parse(HttpContext.User.Identity.Name);
                var commentId = Guid.Parse(id);
                await _commentsService.DeleteMy(userId, commentId);

                return(Ok());
            }
            catch (ArgumentException ex)
            {
                return(BadRequest(new { message = ex.Message }));
            }
        }