1.0.0
This commit is contained in:
@@ -9,11 +9,9 @@ if (Astro.locals.user) {
|
||||
return Astro.redirect('/dashboard');
|
||||
}
|
||||
|
||||
// Check if this would be the first user
|
||||
const userCountResult = await db.select({ count: count() }).from(users).get();
|
||||
const isFirstUser = userCountResult ? userCountResult.count === 0 : true;
|
||||
|
||||
// Check if registration is enabled (only if not first user)
|
||||
let registrationDisabled = false;
|
||||
if (!isFirstUser) {
|
||||
const registrationSetting = await db.select()
|
||||
|
||||
Reference in New Issue
Block a user