def get(self): # Get user_id from parser args = collection_user_id_parser.parse_args() user_id = args.get('user_id') result = Collection.get_user_collection(user_id) if result == None: return {'message': 'Resource not found'}, 404 return {'Collections': result}, 200
def get(self, user_id): # Is user existed if not User.is_user_exists_by_id(user_id): return {'message': "Resource not found"}, 404 result = Collection.get_user_collection(user_id) return {'list': result}, 200