mirror of https://github.com/wg-easy/wg-easy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
370 B
13 lines
370 B
import { UserSetupSchema } from '#db/repositories/user/types';
|
|
|
|
export default defineSetupEventHandler(2, async ({ event }) => {
|
|
const { username, password } = await readValidatedBody(
|
|
event,
|
|
validateZod(UserSetupSchema, event)
|
|
);
|
|
|
|
await Database.users.create(username, password);
|
|
|
|
await Database.general.setSetupStep(3);
|
|
return { success: true };
|
|
});
|
|
|