public async Task <StoryBoardModel> GetStoryBoardViewModel(int id) { var storyBoardCore = await _storyboardStore.GetStoryBoard(id); var textWidgets = await _textWidgetEngine.GetTextWidgetModels(id); var imageWidgets = await _imageWidgetEngine.GetImageWidgetModels(id); var model = new StoryBoardModel() { Id = id, ImageWidgetModels = imageWidgets, TextWidgetModels = textWidgets, Synopsis = storyBoardCore.Synopsis, Title = storyBoardCore.Title, CoverPortrait = storyBoardCore.CoverPortrait }; return(model); }
public async Task <ActionResult> GetTextWidgets([FromQuery] int storyBoardId) { var widgets = await _textWidgetEngine.GetTextWidgetModels(storyBoardId); return(Ok(widgets)); }