fix: type checking
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
This commit is contained in:
parent
8c947f5abf
commit
68baa81f3f
1 changed files with 2 additions and 2 deletions
|
|
@ -148,7 +148,7 @@ def login_via_token(login_token):
|
|||
|
||||
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def send_login_link(email, subject=None):
|
||||
def send_login_link(email: str, subject: str | None =None):
|
||||
if not frappe.db.exists("User", email):
|
||||
frappe.throw("No registered account with this email address")
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ def send_login_link(email, subject=None):
|
|||
|
||||
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def login_via_key(key):
|
||||
def login_via_key(key: str):
|
||||
cache_key = f"one_time_login_key:{key}"
|
||||
email = frappe.cache().get_value(cache_key)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue