Make registrations configurable by env

This commit is contained in:
Alex Gleason
2023-09-10 23:43:06 -05:00
parent 0adb6f5eba
commit 82c4f0827e
3 changed files with 9 additions and 1 deletions

View File

@@ -22,6 +22,10 @@ const createAccountSchema = z.object({
});
const createAccountController: AppController = async (c) => {
if (!Conf.registrations) {
return c.json({ error: 'Registrations are disabled.' }, 403);
}
const pubkey = c.get('pubkey')!;
const result = createAccountSchema.safeParse(await c.req.json());