Beispiel #1
0
        public async Task <IActionResult> GetRecipeNotification(int id)
        {
            var notifications = await _repo.GetNotifications(id);

            var notificationsMapped = _mapper.Map <IEnumerable <NotificationForDetailedDto> >(notifications);

            foreach (var notification in notificationsMapped)
            {
                notification.Username = await _repo.GetUsername(notification.UserId);
            }

            return(Ok(notificationsMapped));
        }