Exemplo n.º 1
0
        public async Task <IReadOnlyCollection <LogMessage> > GetLogMessages(Guid currentMemberId, string level, int page, int pageSize)
        {
            IReadOnlyCollection <ChapterAdminMember> adminMembers = await _chapterRepository.GetChapterAdminMembersByMember(currentMemberId);

            if (!adminMembers.Any(x => x.SuperAdmin))
            {
                throw new OdkNotAuthorizedException();
            }

            return(await _loggingRepository.GetLogMessages(level, page, pageSize));
        }
Exemplo n.º 2
0
 public List <LogMessage> GetLogMessages()
 {
     return(_repository.GetLogMessages().OrderByDescending(l => l.Timestamp).ToList());
 }