Skip to content

Commit

Permalink
fix token is undefiend
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavPS committed Jul 24, 2023
1 parent eab585a commit b9402e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pages/api/video/[id]/hls/[quality]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const logger = new Logger();
const segmentDur = Transcoding.SEGMENT_DURATION; // Controls the duration (in seconds) that the file will be chopped into.

export default async (req, res) => {
const { id, quality, duration, group, audioStream, type } = req.query;
// TODO: Remove token from here, make the m3u8 links work without token in the GET parameters
const { id, quality, duration, group, audioStream, type, token } = req.query;

if (!validateUser(req, process.env.SECRET, 10800)) {
res.status(403).end();
Expand Down
3 changes: 2 additions & 1 deletion pages/api/video/[id]/hls/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ const getSubtitleStreams = (id, subtitles, type, token) => {
}

export default async (req, res) => {
const { id, audioStream, type } = req.query;
// TODO: Remove token from here, make the m3u8 links work without token in the GET parameters
const { id, audioStream, type, token } = req.query;

if (!validateUser(req)) {
res.status(403).end();
Expand Down

0 comments on commit b9402e7

Please sign in to comment.