Beispiel #1
0
        public ISlackResponseMessage GetNKudosByUserId(Kudo kudo)
        {
            var numberOfKudos = kudo.CommandText.Split(' ')[1];

            if (numberOfKudos == "*")
            {
                return(this.GetAllUserKudos(kudo.UserId));
            }

            var kudos = this.kudoRepository.GetNByUserId(kudo.UserId, Convert.ToInt32(numberOfKudos)).Select(x => x.Map <Kudo>());

            return(SlackResponseHelper.BuildSlashResponseFromKudoList(kudos));
        }
Beispiel #2
0
        public ISlackResponseMessage GetAllUserKudos(string userId)
        {
            var kudos = this.kudoRepository.GetAllByUserId(userId).Select(x => x.Map <Kudo>());

            return(SlackResponseHelper.BuildSlashResponseFromKudoList(kudos));
        }