We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 228fbaf commit 53a931dCopy full SHA for 53a931d
1 file changed
apps/web/server/lib/auth/login/getServerSideProps.tsx
@@ -39,7 +39,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
39
},
40
};
41
}
42
- } catch (e) {
+ } catch {
43
return {
44
redirect: {
45
destination: "/auth/error?error=Invalid%20JWT%3A%20Please%20try%20again",
@@ -76,8 +76,8 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
76
77
78
79
- const userCount = await prisma.user.count();
80
- if (userCount === 0) {
+ const userExists = await prisma.user.findFirst({ select: { id: true } });
+ if (!userExists) {
81
// Proceed to new onboarding to create first admin user
82
83
0 commit comments