Exemplo n.º 1
0
        public async Task <IActionResult> Latest()
        {
            logger.LogInformation($"{nameof(Latest)}()");
            IEnumerable <PhotoModel> latestPhotos = await photosService.GetLatestPhotos(GetCurrentUserId());

            return(Json(latestPhotos.Select(photoModelConverter.ToPublic)));
        }
        public async Task <IActionResult> Latest()
        {
            logger.LogInformation($"{nameof(Latest)}()");
            IEnumerable <PhotoModel> latestPhotos = await photosService.GetLatestPhotos(GetCurrentUserId());

            UserId userId = GetCurrentUserId();

            return(View(latestPhotos.Select(x => photoModelConverter.ToPublic(x, userId.Equals(Guid.Empty) ? null : (Guid?)userId))));
        }