Exemplo n.º 1
0
        public IHttpActionResult DeleteBatch(int id)
        {
            string token = "";

            if (Request.Headers.Contains("oauth_token"))
            {
                token = Request.Headers.GetValues("oauth_token").First();
            }
            try
            {
                batchService.DeleteById(token, id);
                return(Ok("lote eliminado con exito"));
            }
            catch (Exception e)
            {
                return(Content(HttpStatusCode.ExpectationFailed, e.Message));
            }
        }