process_action_request
This commit is contained in:
@@ -87,14 +87,21 @@ def merms_account_bar():
|
||||
response = AccountService.process_bar_request(data)
|
||||
return response
|
||||
|
||||
@api.route("/panel/account-actions", methods=["POST"])
|
||||
@api.route("/panel/account/bar", methods=["POST"])
|
||||
@jwt_required()
|
||||
def merms_account_bar2():
|
||||
data = request.get_json()
|
||||
response = AccountService.process_bar_request(data)
|
||||
return response
|
||||
|
||||
@api.route("/panel/account/actions", methods=["POST"])
|
||||
@jwt_required()
|
||||
def merms_account_actions():
|
||||
data = request.get_json()
|
||||
response = AccountService.process_request(data)
|
||||
response = AccountService.process_action_request(data)
|
||||
return response
|
||||
|
||||
@api.route("/panel/account-productsurl", methods=["POST"])
|
||||
@api.route("/panel/account/productsurl", methods=["POST"])
|
||||
@jwt_required()
|
||||
def merms_account_product_url():
|
||||
data = request.get_json()
|
||||
|
||||
@@ -38,6 +38,22 @@ class AccountService(BaseService):
|
||||
}
|
||||
return ResponseHelper.success(data=bar_data)
|
||||
|
||||
@staticmethod
|
||||
def process_action_request(data):
|
||||
bar_data = {
|
||||
"last_update": datetime.datetime.utcnow(),
|
||||
"top_bar": [
|
||||
{"id": "1", "description": "Contacts", "last_update": "10-10-2010 11:00 AM",
|
||||
"value": random.randint(0, 10), "data_span": 'Last 2 months'},
|
||||
{"id": "2", "description": "Site Traffic", "last_update": "10-10-2010 11:30 AM",
|
||||
"value": random.randint(0, 10), "data_span": 'Past 12 hours'},
|
||||
{"id": "3", "description": "Appointments", "last_update": "10-12-2010 11:30 AM",
|
||||
"value": random.randint(0, 10), "data_span": 'Last 14 days'},
|
||||
{"id": "4", "description": "Purchases", "last_update": "10-12-2010 11:30 AM",
|
||||
"value": random.randint(0, 10), "data_span": 'Last 3 months'},
|
||||
]
|
||||
}
|
||||
return ResponseHelper.success(data=bar_data)
|
||||
|
||||
@staticmethod
|
||||
def process_request(data):
|
||||
|
||||
Reference in New Issue
Block a user