public ActionResult Index(string env = null, string prj = null, string prjCfg = null, string prjCfgBuild = null) { if (!string.IsNullOrEmpty(env) || !string.IsNullOrEmpty(prj) || !string.IsNullOrEmpty(prjCfg) || !string.IsNullOrEmpty(prjCfgBuild)) { if (string.IsNullOrEmpty(env) || string.IsNullOrEmpty(prj) || string.IsNullOrEmpty(prjCfg)) { return BadRequest(); } } FunnyGif funnyGif = FunnyGifs.GetRandomGif(); var viewModel = new IndexViewModel { TipOfTheDay = LifeProFuckingTips.GetTodayTip(), FunnyGifUrl = funnyGif.Url, FunnyGifDescription = funnyGif.Description, CanDeploy = SecurityUtils.CanDeploy, ShowOnlyDeployable = _onlyDeployableCheckedByDefault, IsCreatePackageVisible = _isCreatePackageVisible, InitialSelection = !string.IsNullOrEmpty(env) ? new InitialSelection { TargetEnvironmentName = env, ProjectName = prj, ProjectConfigurationName = prjCfg, ProjectConfigurationBuildId = prjCfgBuild, } : null, }; return View(viewModel); }
public ActionResult Index() { var viewModel = new IndexViewModel { TipOfTheDay = LifeProFuckingTips.GetTodayTip(), }; return View(viewModel); }