public HttpResponseMessage DeleteReport(int id) { ReportsRepository.DeleteReport(id); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK); return(response); }
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()); }