fix: remove unused imports

This commit is contained in:
Revant Nandgaonkar 2021-04-19 15:54:16 +05:30 committed by Suraj Shetty
parent 2adadd5829
commit 37cd622628
3 changed files with 4 additions and 3 deletions

View file

@ -37,8 +37,6 @@ def handle():
`/api/resource/{doctype}/{name}?run_method={method}` will run a whitelisted controller method
"""
validate_auth()
parts = frappe.request.path[1:].split("/",3)
call = doctype = name = None
@ -149,6 +147,9 @@ def get_request_form_data():
def validate_auth():
"""
Authenticate and sets user for the request.
"""
authorization_header = frappe.get_request_header("Authorization", str()).split(" ")
if len(authorization_header) == 2:

View file

@ -56,6 +56,7 @@ def application(request):
frappe.recorder.record()
frappe.monitor.start()
frappe.rate_limiter.apply()
frappe.api.validate_auth()
if request.method == "OPTIONS":
response = Response()

View file

@ -9,7 +9,6 @@ import frappe
import frappe.utils
import frappe.sessions
from frappe.utils import cint
from frappe.api import validate_auth
from frappe import _, is_whitelisted
from frappe.utils.response import build_response
from frappe.utils.csvutils import build_csv_response