mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 02:31:21 +00:00
Marketplace
- Cache hub calls - call_hub_method using FrappeClient connection - Become a seller UX fixes
This commit is contained in:
@@ -14,6 +14,19 @@ def enable_hub():
|
||||
frappe.db.commit()
|
||||
return hub_settings
|
||||
|
||||
@frappe.whitelist()
|
||||
def call_hub_method(method, params=None):
|
||||
connection = get_client_connection()
|
||||
|
||||
params = json.loads(params)
|
||||
params.update({
|
||||
'cmd': 'hub.hub.api.' + method
|
||||
})
|
||||
|
||||
response = connection.post_api('hub.hub.api.' + method, params)
|
||||
response = connection.post_request(params)
|
||||
return response
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_list(doctype, start=0, limit=20, fields=["*"], filters="{}", order_by=None):
|
||||
connection = get_client_connection()
|
||||
|
||||
Reference in New Issue
Block a user