Exemplo n.º 1
0
 // PUT /Bandeira/token/
 public HttpResponseMessage Put(string token, [FromBody] Bandeira param)
 {
     try
     {
         HttpResponseMessage retorno = new HttpResponseMessage();
         if (Permissoes.Autenticado(token))
         {
             GatewayBandeira.Update(token, param);
             return(Request.CreateResponse(HttpStatusCode.OK));
         }
         else
         {
             return(Request.CreateResponse(HttpStatusCode.Unauthorized));
         }
     }
     catch
     {
         throw new HttpResponseException(HttpStatusCode.InternalServerError);
     }
 }