country list

This commit is contained in:
CHIEFSOFT\ameye
2025-10-04 19:40:17 -04:00
parent 172acb1e20
commit 2558b51aa4
4 changed files with 1042 additions and 3 deletions
+13 -2
View File
@@ -3,7 +3,7 @@ from app.utils.logger import logger
from app.api.services.base_service import BaseService
from marshmallow import ValidationError
from app.extensions import db
from app.models import MembersPending, Members
from app.models import MembersPending, Members, Country
from app.api.helpers.response_helper import ResponseHelper
from werkzeug.security import generate_password_hash, check_password_hash
@@ -123,10 +123,21 @@ class RegisterService(BaseService):
data = jwt.decode(verify_link, RegisterService.JWT_SECRET_KEY, algorithms=["HS256"])
except:
return jsonify({'status': 'INVALID', 'message': 'Link is invalid'}), 403
country_list = []
country_data = Country.get_signup_countries(1)
for subs in country_data:
country_list.append({
'id': subs.id,
'code': subs.code,
'uid': str(subs.uid),
'description': subs.description
})
country = {
"last_update": datetime.datetime.utcnow(),
"list": [
"list": country_list,
"lists": [
{"code": "US", "description": "United States"},
{"code": "CA", "description": "Canada"},
]