2019-09-20 10:08:48 +05:30
|
|
|
import frappe
|
2019-10-09 14:08:01 +05:30
|
|
|
|
2019-09-23 15:55:35 +05:30
|
|
|
from frappe.utils.verified_command import verify_request
|
2019-09-20 10:08:48 +05:30
|
|
|
@frappe.whitelist(allow_guest=True)
|
|
|
|
def get_context(context):
|
2019-11-07 12:47:00 +05:30
|
|
|
if not verify_request():
|
|
|
|
context.success = False
|
|
|
|
return context
|
2019-09-24 16:07:02 +05:30
|
|
|
|
2019-11-07 12:47:00 +05:30
|
|
|
email = frappe.form_dict['email']
|
|
|
|
appointment_name = frappe.form_dict['appointment']
|
2019-09-23 15:55:35 +05:30
|
|
|
|
2019-11-07 12:47:00 +05:30
|
|
|
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
|
2021-08-19 13:41:10 +05:30
|
|
|
return context
|