public IActionResult DeleteStory(int story_id) { try { _storyService.DeleteStory(story_id); return(Ok()); } catch { return(NotFound()); } }
public ActionResult <string> DeleteStory(int id) { var serviceResponse = _storyService.DeleteStory(id); if (serviceResponse > 0) { return($"Story deleted"); } else { return($"Story not deleted"); } }
public IActionResult DeleteStory(string projectid, string storyid) { ViewBag.IsLogin = !string.IsNullOrEmpty(cache.GetString("user")); if (ViewBag.IsLogin) { ViewBag.User = JsonConvert.DeserializeObject <AccountModel>(cache.GetString("user")); } else { return(RedirectToAction("Login", "Account")); } storySvc.DeleteStory(storyid); return(RedirectToAction(nameof(ProjectController.Index), "Project", new { projectid = projectid })); }
//[Authorize(Roles = "Admin")] public async Task <IActionResult> DeleteStory(int storyId) { var result = await storyService.DeleteStory(new StoryIdDetails(storyId)); return(StatusCode((int)result.Code, result.Value)); }
public IActionResult DeleteStory([FromForm] UserStory model) { _storyService.DeleteStory(model.Id); return(RedirectToAction(actionName: nameof(Index))); }
public async Task <IActionResult> DeleteStory([FromRoute] Guid organizationId, [FromRoute] Guid storyId) { var result = await _storyService.DeleteStory(_agencyOwner, storyId); return(Ok(result)); }