Пример #1
0
        public ActionResult <string> AddStory([FromBody] StoryModel story)
        {
            var serviceResponse = _storyService.AddStory(story);

            switch (serviceResponse)
            {
            case 409:
                return($"Story already exists");

            case 201:
                return($"Story {story.Title} was successfully added");

            case 500:
                return($"Story {story.Title} was unable to be added");

            default:
                return("");
            }
        }