Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/(setup)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import { redirect } from "next/navigation";
const SetupPage = async () => {
const profile = await initialProfile();

if (!("id" in profile)) {
return null;
}

const server = await db.server.findFirst({
where: {
members: {
Expand Down
2 changes: 1 addition & 1 deletion lib/initial-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const initialProfile = async() => {
return redirectToSignIn();
}

const profile = await db.profile.findUnique({
const profile = await db.profile.findFirst({
where: {
userId: user.id
}
Expand Down
Loading