Ejemplo n.º 1
0
        public async Task <IActionResult> GetHistory(string app, string channel)
        {
            var entities = await historyEventRepository.QueryByChannelAsync(AppId, channel, 100);

            var response = entities.Select(HistoryEventDto.FromHistoryEvent).ToList();

            return(Ok(response));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetHistory(string app, string channel)
        {
            var entities = await historyEventRepository.QueryByChannelAsync(App.Id, channel, 100);

            var response = entities.Select(x => SimpleMapper.Map(x, new HistoryEventDto())).ToList();

            return(Ok(response));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> GetHistory(string app, string channel)
        {
            var entity = await appProvider.FindAppByNameAsync(app);

            if (entity == null)
            {
                return(NotFound());
            }

            var schemas = await historyEventRepository.QueryByChannelAsync(entity.Id, channel, 100);

            var response = schemas.Select(x => SimpleMapper.Map(x, new HistoryEventDto())).ToList();

            return(Ok(response));
        }
Ejemplo n.º 4
0
        public async Task <IReadOnlyList <ParsedHistoryEvent> > QueryByChannelAsync(Guid appId, string channelPrefix, int count)
        {
            var items = await repository.QueryByChannelAsync(appId, channelPrefix, count);

            return(items.Select(x => new ParsedHistoryEvent(x, texts)).ToList());
        }