예제 #1
0
        public IActionResult Edited(RunEditViewModel model)
        {
            var manuals = new RunManuals(model.Worldname);

            manuals.YoutubeLink  = model.YoutubeLink;
            manuals.SpeedrunLink = model.SpeedrunLink;
            manuals.RuntimeInMs  = parseRuntime(model.Runtime);

            _manualsWriter.Upsert(manuals);

            return(RedirectToAction("Edit", new { worldname = model.Worldname }));
        }
예제 #2
0
        public IActionResult Edit(string worldname)
        {
            RunManuals manuals = _manualsReader.Get(worldname);

            if (manuals == null)
            {
                manuals = new RunManuals(worldname);
            }

            var viewmodel = new RunEditViewModel(manuals);

            return(View(viewmodel));
        }