mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
feat(cli): ✨ Add new CLI commands, move to project root
This commit is contained in:
parent
68f16f9101
commit
fc06b35c09
21 changed files with 332 additions and 67 deletions
|
|
@ -337,8 +337,8 @@ export class User {
|
|||
static async fromDataLocal(data: {
|
||||
username: string;
|
||||
display_name?: string;
|
||||
password: string;
|
||||
email: string;
|
||||
password: string | undefined;
|
||||
email: string | undefined;
|
||||
bio?: string;
|
||||
avatar?: string;
|
||||
header?: string;
|
||||
|
|
@ -353,9 +353,10 @@ export class User {
|
|||
.values({
|
||||
username: data.username,
|
||||
displayName: data.display_name ?? data.username,
|
||||
password: data.skipPasswordHash
|
||||
? data.password
|
||||
: await Bun.password.hash(data.password),
|
||||
password:
|
||||
data.skipPasswordHash || !data.password
|
||||
? data.password
|
||||
: await Bun.password.hash(data.password),
|
||||
email: data.email,
|
||||
note: data.bio ?? "",
|
||||
avatar: data.avatar ?? config.defaults.avatar,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue