set country start

This commit is contained in:
CHIEFSOFT\ameye
2025-10-06 16:18:50 -04:00
parent e8b9c0ba1c
commit 18562c922e
2 changed files with 30 additions and 0 deletions
+8
View File
@@ -389,6 +389,14 @@ def get_office_country():
result = OfficeCountryService.get_office_country_list()
return jsonify(result)
@api.route('/office/set-country', methods=['POST'])
# @token_required
def set_office_country():
# Call the dashboard service
data = request.get_json()
result = OfficeCountryService.set_office_country_list(data)
return jsonify(result)
@api.route('/office/customers', methods=['GET'])
# @token_required
+22
View File
@@ -38,3 +38,25 @@ class OfficeCountryService(BaseService):
logger.error(f"An error occurred while get_office_country_list data: {str(e)}", exc_info=True)
return jsonify({"message": "Internal Server Error"}), 500
@staticmethod
def set_office_country_list(data):
logger.info('ENTER API::get set_office_country_list')
try:
account_result_data =[]
account_result = Country.get_all_countries()
account_result = {
"set_country_data":[],
"message": "Pending implementation"
}
logger.info('RETURN API::get office account view')
logger.info(account_result)
return account_result
except Exception as e:
logger.error(f"An error occurred while get_office_country_list data: {str(e)}", exc_info=True)
return jsonify({"message": "Internal Server Error"}), 500