Skip to content

Commit

Permalink
Do not publish private or maintenance tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeSCahill authored Aug 14, 2024
1 parent f5de9fb commit f2c3729
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/index-masterclasses/index-masterclasses.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ const client = new GraphQLClient('https://play.instruqt.com/graphql', {
async function fetchTracks() {
try {
const data = await client.request(GET_TRACKS_QUERY);
return data.tracks;
// Filter out tracks that are private or in maintenance mode
const filteredTracks = data.tracks.filter(track => !track.private && !track.maintenance);
return filteredTracks;
} catch (error) {
console.error('Error fetching tracks:', error);
return [];
Expand Down

0 comments on commit f2c3729

Please sign in to comment.