country list
This commit is contained in:
@@ -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"},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user