public async Task <IActionResult> UpdateUser(int id, UserUpdateDm userForUpdate)
        {
            if (id != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value))
            {
                return(Unauthorized());
            }

            var userFromRepo = await _repository.GetUser(id);

            var userToSave = _mapper.MapDmToEm(userForUpdate, userFromRepo);

            if (await _repository.SaveAll())
            {
                return(NoContent());
            }

            throw new Exception($"Updating user {id} failed on save.");
        }