Marketplace

- Cache hub calls
- call_hub_method using FrappeClient connection
- Become a seller UX fixes
This commit is contained in:
Faris Ansari
2018-07-26 18:37:01 +05:30
parent 2ca5afa214
commit f4884f8108
3 changed files with 867 additions and 10 deletions

View File

@@ -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()