Beispiel #1
0
        public async Task <ActionResult <ChatModel> > GetChat(Guid chatUid, int pageNumber, int pageSize)
        {
            var uid = new Guid(HttpContext.Request.Headers[AuthorizationHeaders.PersonUid].First());
            var validationResult = _chatValidation.ValidateGetChat(chatUid, pageNumber, pageSize, uid);

            if (!validationResult.ValidationResult)
            {
                return(BadRequest(validationResult.ValidationMessage));
            }
            return(await _chatLogic.GetChat(chatUid, pageNumber, pageSize, uid));
        }
Beispiel #2
0
 public ChatResponseModel GetChat(ChatReceiveModel model)
 {
     try
     {
         return(_chatLogic.GetChat(model));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         return(null);
     }
 }