예제 #1
0
        public async Task <IActionResult> DeleteUser(int id)
        {
            try
            {
                if (!_publicationServices.PublicationExists(id))
                {
                    return(NotFound(new { message = $"Publicacion con Id = {id} no existe" }));
                }

                await _publicationServices.DeletePublication(id);

                return(NoContent());
            }
            catch (Exception e)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, new { message = e.Message }));
            }
        }