Example #1
0
        public IActionResult Post([FromBody] CadastrarUrlViewModel url)
        {
            //Pegar o ID do usuário e associar
            var id = HttpContext.User.Claims.FirstOrDefault(c => c.Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier").Value;

            return(Created("/encurtar", service.Cadastrar(url, id)));
        }