Exemple #1
0
        public (bool ValidationResult, string ValidationMessage) ValidateAddChatMessage(AddMessageModel request, Guid personUid)
        {
            var personChatList = _chatLogic.GetPersonChatList(personUid).Result;

            if (!personChatList.Any(x => x.ChatUid == request.ChatUid))
            {
                return(false, ErrorDictionary.GetErrorMessage(20, _culture));
            }
            return(true, string.Empty);
        }
Exemple #2
0
        public async Task <ActionResult <List <ChatListModel> > > GetPersonChatList()
        {
            var uid = new Guid(HttpContext.Request.Headers[AuthorizationHeaders.PersonUid].First());

            return(await _chatLogic.GetPersonChatList(uid));
        }