Added request verification and url encoding

This commit is contained in:
Pranav Nachanekar
2019-09-23 15:55:35 +05:30
parent a35e34b5f0
commit 8b744b2d03
2 changed files with 22 additions and 2 deletions

View File

@@ -1,8 +1,14 @@
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)