refactor(federation): ♻️ Refactor User federation code

This commit is contained in:
Jesse Wierzbinski 2025-04-08 16:59:18 +02:00
parent d638610361
commit 9ff9b90f6b
No known key found for this signature in database
9 changed files with 152 additions and 180 deletions

View file

@ -48,11 +48,10 @@ export const createUserCommand = defineCommand(
throw new Error(`User ${chalk.gray(username)} is taken.`);
}
const user = await User.fromDataLocal({
const user = await User.register(username, {
email,
password,
username,
admin,
isAdmin: admin,
});
if (!user) {