Пример #1
0
 public dynamic Put([FromBody] Usuario usuario)
 {
     try
     {
         token = HttpContext.Request?.Headers["token"];
         if (_APIBusiness.ValidarToken(token))
         {
             return(Ok(_usuarioBusiness.AtualizaUsuario(usuario)));
         }
         else
         {
             return(Unauthorized());
         }
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }