Esempio n. 1
0
        public HttpResponseMessage DeleteReport(int id)
        {
            ReportsRepository.DeleteReport(id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK);

            return(response);
        }
Esempio n. 2
0
        public ActionResult DeleteReport(string id)
        {
            string token = HttpContext.Request.Headers["token"];

            if (token != TokenEmulator)
            {
                return(Unauthorized());
            }
            if (string.IsNullOrWhiteSpace(id))
            {
                return(BadRequest());
            }
            _reports.DeleteReport(id);
            return(NoContent());
        }