mirror of
https://github.com/SrIzan10/hctv.git
synced 2026-06-06 00:56:56 +00:00
fix: some errors i've noticed when creating db from scratch
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
services:
|
||||
psql:
|
||||
user: 1000:1000
|
||||
image: postgres
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: dfsjhkdswkjntelsmldbfvsgknl5t
|
||||
# my condolences
|
||||
POSTGRES_PASSWORD: skbiditoilet
|
||||
volumes:
|
||||
- ./psql:/var/lib/postgresql/data
|
||||
ports:
|
||||
|
||||
@@ -4,10 +4,12 @@ import { UniversalForm } from '@/components/app/UniversalForm/UniversalForm';
|
||||
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '@/components/ui/card';
|
||||
import { onboard } from '@/lib/form/actions';
|
||||
import { useSession } from '@/lib/providers/SessionProvider';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { redirect, useRouter } from 'next/navigation';
|
||||
|
||||
export default function OnboardingClient() {
|
||||
const { user } = useSession();
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<Card className="mx-auto max-w-sm border-0 shadow-none">
|
||||
<CardHeader className="space-y-1">
|
||||
@@ -25,6 +27,7 @@ export default function OnboardingClient() {
|
||||
schemaName="onboard"
|
||||
action={onboard}
|
||||
onActionComplete={() => {
|
||||
router.refresh();
|
||||
redirect('/');
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -2,6 +2,10 @@ import prisma from "@/lib/db";
|
||||
import { roomService } from "@/lib/services/livekit";
|
||||
|
||||
export default async function runner() {
|
||||
// if there are no users it explodes so yeah
|
||||
if (await prisma.user.count() === 0) {
|
||||
return;
|
||||
}
|
||||
await initializeStreamInfo();
|
||||
await syncStream();
|
||||
setInterval(syncStream, 5000);
|
||||
|
||||
Reference in New Issue
Block a user