public async Task<ActionResult> AuditRepair(AuditRepairModel model) { var sharePointToken = await AuthenticationHelper.GetAccessTokenAsync(AppSettings.DemoSiteServiceResourceId); Dashboard dashboardModel = new Dashboard(sharePointToken); var tasksService = new TasksService(sharePointToken); await tasksService.CompleteRepairApprovalTaskAsync(model); if (model.Result == ApprovalResult.Approved) await dashboardModel.ApproveRepairAsync(model.IncidentId); return RedirectToAction("Index"); }
public async Task <ActionResult> AuditRepair(AuditRepairModel model) { var sharePointToken = await AuthenticationHelper.GetAccessTokenAsync(AppSettings.DemoSiteServiceResourceId); Dashboard dashboardModel = new Dashboard(sharePointToken); var tasksService = new TasksService(sharePointToken); await tasksService.CompleteRepairApprovalTaskAsync(model); if (model.Result == ApprovalResult.Approved) { await dashboardModel.ApproveRepairAsync(model.IncidentId); } return(RedirectToAction("Index")); }