예제 #1
0
        public async Task SortWidgets(string userId, int storyBoardId, IEnumerable <WidgetSortModel> widgetSorts)
        {
            var storyBoardExists = await _storyBoardStore.StoryBoardExists(storyBoardId, userId);

            if (!storyBoardExists)
            {
                throw new ApplicationException("Invalid story board.");
            }

            try
            {
                await _widgetStore.SortWidgets(storyBoardId, widgetSorts);
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Unable to save widget sort.");
            }
        }