mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-27 19:34:38 +00:00
feat(auth): refine demo mode support using SHUMAI_DEMO_MODE API
This commit is contained in:
@@ -34,7 +34,7 @@ export const auth = betterAuth({
|
||||
|
||||
const info = await teamService.getSignupInfo()
|
||||
|
||||
if (info.userCount > 0) {
|
||||
if (info.initialized) {
|
||||
if (!inviteCode) {
|
||||
console.log('[Better Auth Hook] Public signup is disabled')
|
||||
return ctx.json(
|
||||
|
||||
@@ -349,7 +349,9 @@ export class TeamService {
|
||||
const count = await prisma.user.count()
|
||||
|
||||
return {
|
||||
initialized: count > 0,
|
||||
userCount: count,
|
||||
demoMode: process.env.SHUMAI_DEMO_MODE === '1',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user