Ejemplo n.º 1
0
        public async Task <ActionResult <PersonModel> > GetPerson(Guid personUid)
        {
            var currentPersonUid = new Guid(HttpContext.Request.Headers[AuthorizationHeaders.PersonUid].First());
            var validationResult = _personValidation.ValidateGetPerson(personUid);

            if (!validationResult.ValidationResult)
            {
                return(BadRequest(validationResult.ValidationMessage));
            }
            var model = await _personLogic.GetPerson(personUid);

            model.IsFriend = await _personLogic.CheckFriendship(currentPersonUid, personUid);

            return(model);
        }