protected async void StorySelected(EntryStoryModel model) { await Api.UpdateEntryStoryAsync(EntryId, model); await LoadStoryAsync(); StateHasChanged(); }
public Task <IActionResult> Get(string entryId) => RunEntryAsync(entryId, Permission.Read, entry => { StoryChapter chapter = null; Story story = null; if (entry.Chapter != null) { chapter = entry.Chapter; story = entry.Chapter.Story; } else if (entry.Story != null) { story = entry.Story; } var model = new EntryStoryModel() { StoryId = story?.Id, StoryTitle = story?.Title, ChapterId = chapter?.Id, ChapterTitle = chapter?.Title }; return(Task.FromResult <IActionResult>(Ok(model))); });