Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53a931d

Browse files
authored
Improve check user exists (#25057)
1 parent228fbaf commit53a931d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎apps/web/server/lib/auth/login/getServerSideProps.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
3939
},
4040
};
4141
}
42-
}catch(e){
42+
}catch{
4343
return{
4444
redirect:{
4545
destination:"/auth/error?error=Invalid%20JWT%3A%20Please%20try%20again",
@@ -76,8 +76,8 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
7676
};
7777
}
7878

79-
constuserCount=awaitprisma.user.count();
80-
if(userCount===0){
79+
constuserExists=awaitprisma.user.findFirst({select:{id:true}});
80+
if(!userExists){
8181
// Proceed to new onboarding to create first admin user
8282
return{
8383
redirect:{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp