def get_user_followers(relationships_query: QueryRelationshipsByFollowerID, users_query: QueryUserByID, user_id): relationships = relationships_query.execute(UserID(user_id)) followees_with_data = [ users_query.execute(relationship.followee_id) for relationship in relationships ] return to_multiple_user_response(followees_with_data), 200
def get_user_by_id(user_id, query: QueryUserByID): return to_multiple_user_response([query.execute(UserID(user_id))]), 200