public async Task <ServiceResult <IDictionary <InfractionType, int> > > GetInfractionCountsForUserAsync(ulong subjectId) => await AuthorizationService.CheckClaims(AuthorizationClaim.ModerationRead) .ShortCircuitAsync(InfractionRepository.GetInfractionCountsAsync(new InfractionSearchCriteria { GuildId = AuthorizationService.CurrentGuildId, SubjectId = subjectId, IsDeleted = false }));
public async Task <IDictionary <InfractionType, int> > GetInfractionCountsForUserAsync(ulong subjectId) { AuthorizationService.RequireClaims(AuthorizationClaim.ModerationRead); return(await InfractionRepository.GetInfractionCountsAsync(new InfractionSearchCriteria { GuildId = AuthorizationService.CurrentGuildId, SubjectId = subjectId, IsDeleted = false })); }