public async Task <IActionResult> GetAllClubAnnualReports(string searchedData, int page, int pageSize, int sortKey, bool auth) { var user = await _userManager.GetUserAsync(User); try { return(StatusCode(StatusCodes.Status200OK, new { clubAnnualReports = await _clubAnnualReportService.GetAllAsync(user, (await _userManager.GetRolesAsync(user)).Contains(Roles.Admin), searchedData, page, pageSize, sortKey, auth) })); } catch (NullReferenceException) { _loggerService.LogError($"Annual reports not found"); return(StatusCode(StatusCodes.Status404NotFound, new { message = _localizer["NotFound"].Value })); } }
public async Task <IActionResult> GetAllClubAnnualReports() { return(StatusCode(StatusCodes.Status200OK, new { annualReports = await _ClubAnnualReportService.GetAllAsync(User) })); }
public async Task <IActionResult> GetAllClubAnnualReports() { return(StatusCode(StatusCodes.Status200OK, new { clubAnnualReports = await _clubAnnualReportService.GetAllAsync(await _userManager.GetUserAsync(User)) })); }