From 286e73c40cf6ed9d3455155be9ae174018724641 Mon Sep 17 00:00:00 2001 From: sauravsaha Date: Fri, 7 May 2021 17:48:58 +0530 Subject: [PATCH] Booking Feature Commented as API of Booking now needs Captcha and which would break the system --- COWIN/Models/CovidVaccinationCenter.cs | 29 +++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/COWIN/Models/CovidVaccinationCenter.cs b/COWIN/Models/CovidVaccinationCenter.cs index c28afd3..998dc97 100644 --- a/COWIN/Models/CovidVaccinationCenter.cs +++ b/COWIN/Models/CovidVaccinationCenter.cs @@ -95,21 +95,22 @@ private void GetAvailableSlots(CovidVaccinationCenters covidVaccinationCenters) session.Vaccine == _configuration["CoWinAPI:VaccineType"] && cvc.FeeType == _configuration["CoWinAPI:VaccineFeeType"] ) { - foreach(var slot in session.Slots) - { - Console.ResetColor(); - Console.ForegroundColor = ConsoleColor.Yellow; - Console.WriteLine($"Trying to Book Appointment for CVC: {cvc.Name} - PIN: {cvc.Pincode} - District: {cvc.DistrictName} - Date: {session.Date} - Slot: {slot}"); - Console.ResetColor(); - var isBookingSuccessful = BookAvailableSlot(session.SessionId, slot); - - if (isBookingSuccessful == true) - { - DisplaySlotInfo(cvc, session); - break; - } + // Commented this as currently due to Captcha Requirement in Booking APIs, we are unable to create the Booking Automatically + //foreach(var slot in session.Slots) + //{ + // Console.ResetColor(); + // Console.ForegroundColor = ConsoleColor.Yellow; + // Console.WriteLine($"Trying to Book Appointment for CVC: {cvc.Name} - PIN: {cvc.Pincode} - District: {cvc.DistrictName} - Date: {session.Date} - Slot: {slot}"); + // Console.ResetColor(); + // var isBookingSuccessful = BookAvailableSlot(session.SessionId, slot); + + // if (isBookingSuccessful == true) + // { + // DisplaySlotInfo(cvc, session); + // break; + // } - } + //} DisplaySlotInfo(cvc, session); } }