mirror of
https://github.com/docmost/docmost.git
synced 2025-11-17 01:51:09 +10:00
Set default language on invitation signup (#691)
* Default language selection to en-US if locale is undefined (Client)
This commit is contained in:
@ -99,7 +99,8 @@ export class UserRepo {
|
||||
trx?: KyselyTransaction,
|
||||
): Promise<User> {
|
||||
const user: InsertableUser = {
|
||||
name: insertableUser.name || insertableUser.email.toLowerCase(),
|
||||
name:
|
||||
insertableUser.name || insertableUser.email.split('@')[1].toLowerCase(),
|
||||
email: insertableUser.email.toLowerCase(),
|
||||
password: await hashPassword(insertableUser.password),
|
||||
locale: 'en-US',
|
||||
@ -110,7 +111,7 @@ export class UserRepo {
|
||||
const db = dbOrTx(this.db, trx);
|
||||
return db
|
||||
.insertInto('users')
|
||||
.values(user)
|
||||
.values({ ...insertableUser, ...user })
|
||||
.returningAll()
|
||||
.executeTakeFirst();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user