public IActionResult Post([FromBody] AuditRequest req) { _log4net.Info(" Http POST request from " + nameof(AuditSeverityController)); if (req == null) { return(BadRequest()); } if (req.Auditdetails.Type != "Internal" && req.Auditdetails.Type != "SOX") { return(BadRequest("You have given wrong audit type")); } try { string Token = HttpContext.Request.Headers["Authorization"].Single().Split(" ")[1]; var response = objProvider.SeverityResponse(req, Token); return(Ok(response)); } catch (Exception e) { _log4net.Error("Exception Occured " + e.Message + " from " + nameof(AuditSeverityController)); return(StatusCode(500)); } }
public IActionResult ProjectExecutionStatus([FromBody] AuditRequest req) { _log4net.Info(" Http POST Request From: " + nameof(AuditSeverityController)); if (req == null) { return(BadRequest()); } if (req.Auditdetails.Type != "Internal" && req.Auditdetails.Type != "SOX") { return(BadRequest("Wrong Audit Type")); } try { AuditResponse response = _severityProvider.SeverityResponse(req); return(Ok(response)); } catch (Exception e) { _log4net.Error(e.Message); return(StatusCode(500)); } }
public IActionResult Post([FromBody] AuditRequest req) //Change Here { _log4net.Info(" Http POST request from AuditSeverity"); if (req == null) { return(BadRequest()); } try { var response = obj.SeverityResponse(req); if (response == null) { return(BadRequest("Check Your Data")); } return(Ok(response)); } catch (Exception e) { _log4net.Error("Exception Occured " + e.Message); return(StatusCode(500)); } }