public IActionResult ChangePhoto(UserChangeImage model)
        {
            var id = User.FindFirst(ClaimTypes.NameIdentifier)?.Value;

            model.userId = int.Parse(id);

            string uniqueFileName = null;

            if (model.uploadImage != null)
            {
                string uploadsFolder = Path.Combine(hostingEnvironment.WebRootPath, "images");
                uniqueFileName = Guid.NewGuid().ToString() + "_" + model.uploadImage.FileName;
                string filePath = Path.Combine(uploadsFolder, uniqueFileName);
                model.uploadImage.CopyTo(new FileStream(filePath, FileMode.Create));
            }

            userDatabaseRepository.changeProfilePic(uniqueFileName, model.userId);
            return(RedirectToAction("Index"));
        }