2019-09-20 04:38:48 +00:00
|
|
|
import frappe
|
2019-09-23 10:25:35 +00:00
|
|
|
from frappe.utils.verified_command import verify_request
|
2021-09-02 11:14:59 +00:00
|
|
|
|
|
|
|
|
2019-09-20 04:38:48 +00:00
|
|
|
@frappe.whitelist(allow_guest=True)
|
|
|
|
def get_context(context):
|
2019-11-07 07:17:00 +00:00
|
|
|
if not verify_request():
|
|
|
|
context.success = False
|
|
|
|
return context
|
2019-09-24 10:37:02 +00:00
|
|
|
|
2019-11-07 07:17:00 +00:00
|
|
|
email = frappe.form_dict['email']
|
|
|
|
appointment_name = frappe.form_dict['appointment']
|
2019-09-23 10:25:35 +00:00
|
|
|
|
2019-11-07 07:17:00 +00:00
|
|
|
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
|