Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'items': MovieModel,
}
}
}
})
@login_required
def get(self):
db = get_db()
result = db.run(
'''
MATCH (:User {id: {user_id}})-[rated:RATED]->(movie:Movie)
RETURN DISTINCT movie, rated.rating as my_rating
''', {'user_id': g.user['id']}
)
return [serialize_movie(record['movie'], record['my_rating']) for record in result]