public async Task <IActionResult> GetAll() { var currentUser = await GetCurrentUserAsync(); if (currentUser is null || currentUser is default(User)) { return(Unauthorized("No authorized user found.\nPlease log in by using your credentials.")); } var logs = await _activityLogService.GetAllActivityLogsAsync(currentUser.Id); if (logs is null || logs is default(IList <ActivityLog>)) { return(NotFound("No activity logs found.")); } return(Ok(logs)); }