Implement review fixes

This commit is contained in:
2026-06-18 19:54:12 +05:30
parent bdb8431773
commit 956ef58c79
@@ -1489,7 +1489,7 @@ inline bool verifyAllPaymentsCompleted(Controller& m_controller)
{ {
throw std::runtime_error("No authenticated user found."); throw std::runtime_error("No authenticated user found.");
} }
std::string authenticatedUserId = authenticatedUser->getId(); const std::string& authenticatedUserId = authenticatedUser->getId();
util::Map<std::string, const Invoice*> listOfInvoices = m_controller.getAllInvoices(); util::Map<std::string, const Invoice*> listOfInvoices = m_controller.getAllInvoices();
for (int invoiceIndex = 0; invoiceIndex < listOfInvoices.getSize(); ++invoiceIndex) for (int invoiceIndex = 0; invoiceIndex < listOfInvoices.getSize(); ++invoiceIndex)
{ {
@@ -1498,7 +1498,7 @@ inline bool verifyAllPaymentsCompleted(Controller& m_controller)
{ {
continue; continue;
} }
std::string customerId = invoice->getBooking()->getCustomerId(); const std::string& customerId = invoice->getBooking()->getCustomerId();
if (customerId == authenticatedUserId) if (customerId == authenticatedUserId)
{ {
if (invoice->getStatus() != util::PaymentStatus::COMPLETED) if (invoice->getStatus() != util::PaymentStatus::COMPLETED)