示例#1
0
        public async Task <IEnumerable <Notification> > Get()
        {
            var notifications = await _notificationStore.GetNotificationsAsync();

            foreach (var notification in notifications)
            {
                if (notification?.Subscriber?.Phone != null)
                {
                    notification.Subscriber.Phone = notification.Subscriber.Phone.Substring(0, 6) + "...";
                }

                if (notification?.Subscriber?.Email != null)
                {
                    notification.Subscriber.Email = notification.Subscriber.Email.Substring(0, 3) + "..." +
                                                    notification.Subscriber.Email.Substring(
                        notification.Subscriber.Email.Length - 4);
                }
            }

            return(notifications);
        }