public async Task <IActionResult> SetMainPhoto(int id, int userId)
        {
            if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value))
            {
                return(Unauthorized());
            }
            var UserFromRepo = await _repo.GetUser(userId, true);

            if (!UserFromRepo.Photos.Any(p => p.Id == id))
            {
                return(Unauthorized());
            }

            var DesierdMainPhoto = await _repo.GetPhoto(id);

            if (DesierdMainPhoto.IsMain)
            {
                return(BadRequest("هده الصوره الرئيسية"));
            }

            var currentMainPhoto = await _repo.GetMainPhotoForUSer(userId);

            currentMainPhoto.IsMain = false;
            DesierdMainPhoto.IsMain = true;
            if (await _repo.SaveAll())
            {
                return(NoContent());
            }

            return(BadRequest("حدث خطأ"));
        }