From 18562c922ee811f7ce8b3a9e91ea2e963b0d476f Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 6 Oct 2025 16:18:50 -0400 Subject: [PATCH] set country start --- app/api/routes/routes.py | 8 ++++++++ app/api/services/office_country.py | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/app/api/routes/routes.py b/app/api/routes/routes.py index 38af29c..6f47ee4 100644 --- a/app/api/routes/routes.py +++ b/app/api/routes/routes.py @@ -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 diff --git a/app/api/services/office_country.py b/app/api/services/office_country.py index f253a7c..f0698eb 100644 --- a/app/api/services/office_country.py +++ b/app/api/services/office_country.py @@ -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 +