from flask import jsonify
from database import get_cached_connection
from utils import fetch_assets, fetch_data, fetch_data_course, fetch_data_course_id, fetch_data_videos_wcourse_id, fetch_video_discussion, fetch_videos_description


def video_details(request):
    conn = get_cached_connection()
    cursor = conn.cursor()

    # todo = request.values.get('todo')
    course = request.values.get('course')
    id = request.values.get('id')

    persons = fetch_assets(course, conn, "teachers")

    final_array = {
        "owners": persons,

    }

    cursor.close()
    conn.close()
    return jsonify(final_array), 200
