process_action_request

This commit is contained in:
CHIEFSOFT\ameye
2025-06-24 11:59:45 -04:00
parent 11e4640ee8
commit 0f756921c4
2 changed files with 26 additions and 3 deletions
+10 -3
View File
@@ -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()
+16
View File
@@ -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):