public async Task <IActionResult> Get() { try { var posts = await _postServices.GetPostsAsync(); await _hub.Clients.All.GetMessage(posts); return(Ok(posts)); } catch (Exception e) { _logger.LogError(e, e.Message); return(BadRequest()); } }
public async Task <IActionResult> GetAll() { return(Ok(await _postService.GetPostsAsync())); }
public async Task <IActionResult> GetAll() { var posts = await _postServices.GetPostsAsync(); return(Ok(posts)); }