chore: make sure channel is not live already

This commit is contained in:
2026-01-26 16:40:33 +01:00
parent cc15a06ffb
commit b623de5bdd
2 changed files with 5 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ export async function POST(request: NextRequest) {
owner: {
include: { ban: true },
},
streamInfo: true,
},
});
@@ -47,6 +48,10 @@ export async function POST(request: NextRequest) {
}
}
if (channel?.streamInfo[0].isLive) {
return new Response('stream already live', { status: 403 });
}
return new Response('youre in yay', { status: 200 });
}
} else if (action === 'read' && protocol === 'hls') {

View File

@@ -7,8 +7,6 @@ import {
MediaLoadingIndicator,
MediaControlBar,
MediaPlayButton,
MediaSeekBackwardButton,
MediaSeekForwardButton,
MediaMuteButton,
MediaVolumeRange,
MediaFullscreenButton,