File tree Expand file tree Collapse file tree
src/routes/api/specialStream Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ import type { FpEndpointResponse } from "../(live-statuses)/floatplane/+server.t
66export const GET = ( async ( { fetch} ) => {
77 // In the future this will be from a database, but this will be fine for now. (update a year later: heh)
88
9- const fpLive : FpEndpointResponse = await fetch ( "/api/floatplane?fast=true" ) . then ( r => r . json ( ) ) ;
10-
119 const data : SpecialStream | false = Date . now ( ) > 1742608091103 ? {
1210 title : "Derpy Dinos - Streams with Sarah FP Exclusive" ,
1311 thumbnail : "https://pbs.floatplane.com/stream_thumbnails/5c13f3c006f1be15e08e05c0/690027088370846_1743099965628.jpeg" ,
@@ -33,6 +31,8 @@ export const GET = (async ({fetch}) => {
3331 const hideTime = new Date ( data . start as string )
3432 hideTime . setHours ( hideTime . getHours ( ) + 1.5 ) ;
3533
34+ const fpLive : FpEndpointResponse = await fetch ( "/api/floatplane?fast=true" ) . then ( r => r . json ( ) ) ;
35+
3636 const timeUntil = getTimeUntil ( hideTime ) ;
3737 if ( timeUntil . late && ! ( timeUntil . distance < ( 2 * 60 * 60e3 ) && fpLive . isLive ) ) {
3838 return json ( false ) ;
You can’t perform that action at this time.
0 commit comments