示例#1
0
 // PUT /GreenCard/token/
 public HttpResponseMessage Put(string token, [FromBody] GreenCard param)
 {
     try
     {
         HttpResponseMessage retorno = new HttpResponseMessage();
         if (Permissoes.Autenticado(token))
         {
             GatewayGreenCard.Update(token, param);
             return(Request.CreateResponse(HttpStatusCode.OK));
         }
         else
         {
             return(Request.CreateResponse(HttpStatusCode.Unauthorized));
         }
     }
     catch
     {
         throw new HttpResponseException(HttpStatusCode.InternalServerError);
     }
 }