Esempio n. 1
0
        public IActionResult GetKeysByUser(Guid userId)
        {
            var userFound = _userApplication.Get(userId).Data;

            if (userFound == null)
            {
                return(NotFound());
            }

            var keyInfoList = _userApplication.GetKeys(userId).Data;

            keyInfoList = keyInfoList.Select(key =>
            {
                key = CreateLink(key);
                return(key);
            });

            var wrapper = new LinkedCollectionWrapperDto <KeyInfoDto>(keyInfoList);

            return(Ok(CreateLink(wrapper)));
        }