brotherton-erpnext/erpnext/www/book_appointment/verify/index.py
Pranav Nachnekar 6aa763221b fix: rename appointment booking route (#19886)
* rename appoinment booking route

* fix: replace all references to book-appointment route
2019-12-10 21:35:28 +05:30

20 lines
512 B
Python

import frappe
from frappe.utils.verified_command import verify_request
@frappe.whitelist(allow_guest=True)
def get_context(context):
if not verify_request():
context.success = False
return context
email = frappe.form_dict['email']
appointment_name = frappe.form_dict['appointment']
if email and appointment_name:
appointment = frappe.get_doc('Appointment',appointment_name)
appointment.set_verified(email)
context.success = True
return context
else:
context.success = False
return context