public async Task <IActionResult> EditWork(int userId, int id, [FromBody] WorkDTO workForEdit) { if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value)) { return(Unauthorized()); } _repo.EditWork(id, workForEdit); await _repo.SaveAll(); return(Ok()); }
public IActionResult ApplayEdit(Work workDto) { workRepository.EditWork(workDto); return(RedirectToAction("ShowTaskWorks", new { @taskId = _taskId })); }
public IActionResult Edit(EditWorkDto editWorkDto) { workRepository.EditWork(editWorkDto); return(Redirect("GetAllWorks")); }