-
- Offline
+
+ {/* Offline Message */}
+
+
+ {/* Past Streams Section */}
+
)}
diff --git a/packages/web/src/routes/api/streams.$username.replays.ts b/packages/web/src/routes/api/streams.$username.replays.ts
index bffc2133..a4604c39 100644
--- a/packages/web/src/routes/api/streams.$username.replays.ts
+++ b/packages/web/src/routes/api/streams.$username.replays.ts
@@ -36,56 +36,27 @@ const handleGet = async ({
const auth = getAuth()
const session = await auth.api.getSession({ headers: request.headers })
- const isOwner = session?.user?.id === user.id
- // Owners can always see their own replays
- if (isOwner) {
- try {
- const replays = await database
- .select()
- .from(stream_replays)
- .where(eq(stream_replays.user_id, user.id))
- .orderBy(
- desc(stream_replays.started_at),
- desc(stream_replays.created_at)
- )
- return json({ replays })
- } catch (error) {
- console.error("[stream-replays] Error fetching replays:", error)
- return json({ error: "Failed to fetch replays" }, 500)
- }
- }
+ // ONLY nikita@nikiv.dev can view replays
+ const isNikita = session?.user?.email === "nikita@nikiv.dev"
- // Non-owners need subscription to this creator to view replays
- if (!session?.user?.id) {
+ if (!isNikita) {
return json(
{ error: "Subscription required", code: "SUBSCRIPTION_REQUIRED" },
403
)
}
- const hasSubscription = await hasCreatorSubscription(session.user.id, user.id)
- if (!hasSubscription) {
- return json(
- { error: "Subscription required", code: "SUBSCRIPTION_REQUIRED" },
- 403
- )
- }
-
- // With subscription, can view public ready replays
+ // Nikita can see all replays
try {
const replays = await database
.select()
.from(stream_replays)
- .where(
- and(
- eq(stream_replays.user_id, user.id),
- eq(stream_replays.is_public, true),
- eq(stream_replays.status, "ready")
- )
+ .where(eq(stream_replays.user_id, user.id))
+ .orderBy(
+ desc(stream_replays.started_at),
+ desc(stream_replays.created_at)
)
- .orderBy(desc(stream_replays.started_at), desc(stream_replays.created_at))
-
return json({ replays })
} catch (error) {
console.error("[stream-replays] Error fetching replays:", error)