def get_my_followed_projects(conn, user_ID): """Get collaborator's followed project list by user id Param: conn -- database connection user_ID -- collaborator digital id Return: List of followed project info """ projects_followed = [] # query subscription tabale query = f"SELECT * FROM subscription WHERE is_dreamer=0 AND c_subscriber={user_ID}" result = conn.execute(query) proj_list = [] # fetch project information for i in range(result.rowcount): row = result.fetchone() proj_info = Project.get_by_proj_id(conn, row['projectID']).text_info() proj_info['follow'] = True proj_list.append(proj_info) return proj_list