public async Task DeleteComment([FromQuery] DeleteCommentDto dto) { dto.UserId = User.GetUserId(); await _advertCommentService.DeleteAsync(dto, User.IsInRole("Admin")); }
public async Task <IActionResult> DeleteComment([FromForm] DeleteCommentDto comment) { await _commentService.DeleteAsync(comment); return(RedirectToAction("Get", "Advert", new { id = comment.AdvertId })); }