def get(self): user_id = get_jwt_identity() children = [child.json() for child in ChildModel.find_all()] if user_id: return {'children': children}, 200 return { 'message': 'no data available unless you log in.', 'error': 'token expired' }, 401
def get(): children = ChildModel.find_all() return children, 200