public async Task <ActionResult <ImageDTO> > PostImage([FromBody] ImageDTO image) { var userId = Int32.Parse(User.Claims.FirstOrDefault(x => x.Type.Equals("UserId")).Value); image.UserId = userId; var result = await locationsService.AddImage(image); if (result != null) { return(Created("Image Created Succesfully", result)); } else { return(Conflict("Ha ocurrido un error guardando su imagen")); } }