/// <summary> /// post method for inserting new status /// </summary> /// <param name="newStatus"></param> /// <returns></returns> public async Task <HttpResponseMessage> Post([FromBody] StatusDto newStatus) { try { if (await logicHelper.AddStatus(newStatus)) { var Response1 = Request.CreateResponse(HttpStatusCode.OK, "successful insert"); log.Info("Status Post Successful"); return(Response1); } var Response2 = Request.CreateResponse(HttpStatusCode.BadRequest, "failed to insert"); log.Info("Status Post Unsuccessful"); return(Response2); } catch (Exception ex) { LogHelper.SendError(log, ex); return(Request.CreateResponse(HttpStatusCode.BadRequest)); } }