Make it public!

This commit is contained in:
Bruno Bernardino
2024-03-16 08:40:24 +00:00
commit a5cafdddca
114 changed files with 9569 additions and 0 deletions

15
lib/config.ts Normal file
View File

@@ -0,0 +1,15 @@
import 'std/dotenv/load.ts';
import { isThereAnAdmin } from './data/user.ts';
export async function isSignupAllowed() {
const areSignupsAllowed = Deno.env.get('CONFIG_ALLOW_SIGNUPS') === 'true';
const areThereAdmins = await isThereAnAdmin();
if (areSignupsAllowed || !areThereAdmins) {
return true;
}
return false;
}