Exemplo n.º 1
0
        public async Task <Profile> PostCreateNewProfile([FromBody] CreateProfileRequest createProfileRequest)
        {
            Profile profile = new Profile();

            profile.IdAccount = int.Parse(User.Claims.FirstOrDefault(claim => claim.Type == "IdAccount").Value);
            profile.Username  = createProfileRequest.Username;

            return(await _profileRepository.CreateNewProfile(profile));
        }