AthletiFi / athletifi-website

Official website for AthletiFi
https://www.athleti.fi
1 stars 5 forks source link

Connect Next.js to Video asset id from database #210

Closed chef-louis closed 2 months ago

chef-louis commented 3 months ago

Task: Retrieve Video Asset ID from Database and Display in Next.js

Objective:

Retrieve the video asset ID from the existing full_match_videos table in the PostgreSQL database and use it in the Next.js front-end to display the correct video in the next-video component.

Tasks:

  1. Add Video Asset ID to API endpoint

    • [x] Write a database query to retrieve the mux_playback_id from the full_match_videos table for the given video identifier.
    • [x] Return the video asset ID (mux_playback_id) as part of the dashboard data
  2. Update Next-Video Component

    • [ ] Modify the right dashboard component in Next.js to accept the video asset ID as a prop.
    • [ ] Pass the retrieved video asset ID as a prop to the next-video component.