mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-03 10:34:55 +02:00
add set server admin password to cli
This commit is contained in:
parent
ddd292422b
commit
fc19d0ba8b
9 changed files with 172 additions and 5 deletions
|
@ -53,7 +53,7 @@ export async function setupServerAdmin() {
|
|||
if (existing.email !== email) {
|
||||
await trx
|
||||
.update(users)
|
||||
.set({ email })
|
||||
.set({ email, username: email })
|
||||
.where(eq(users.userId, existing.userId));
|
||||
|
||||
logger.info(`Server admin email updated`);
|
||||
|
@ -77,6 +77,7 @@ export async function setupServerAdmin() {
|
|||
logger.info(`Server admin created`);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Failed to setup server admin");
|
||||
logger.error(e);
|
||||
trx.rollback();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue