PR comments
This commit is contained in:
parent
a98192ba57
commit
ea7d3c4b99
|
@ -20,7 +20,7 @@ import redis from "./utilities/redis"
|
||||||
import * as migrations from "./migrations"
|
import * as migrations from "./migrations"
|
||||||
import { events, installation, tenancy } from "@budibase/backend-core"
|
import { events, installation, tenancy } from "@budibase/backend-core"
|
||||||
import { createAdminUser, getChecklist } from "./utilities/workerRequests"
|
import { createAdminUser, getChecklist } from "./utilities/workerRequests"
|
||||||
import { DEFAULT_TENANT_ID } from "@budibase/backend-core/dist/src/constants"
|
import { tenantSucceeded } from "@budibase/backend-core/dist/src/events/publishers/backfill"
|
||||||
|
|
||||||
const app = new Koa()
|
const app = new Koa()
|
||||||
|
|
||||||
|
@ -122,10 +122,11 @@ module.exports = server.listen(env.PORT || 0, async () => {
|
||||||
const checklist = await getChecklist()
|
const checklist = await getChecklist()
|
||||||
if (!checklist?.adminUser?.checked) {
|
if (!checklist?.adminUser?.checked) {
|
||||||
try {
|
try {
|
||||||
|
const tenantId = tenancy.getTenantId()
|
||||||
await createAdminUser(
|
await createAdminUser(
|
||||||
env.BB_ADMIN_USER_EMAIL,
|
env.BB_ADMIN_USER_EMAIL,
|
||||||
env.BB_ADMIN_USER_PASSWORD,
|
env.BB_ADMIN_USER_PASSWORD,
|
||||||
"default"
|
tenantId
|
||||||
)
|
)
|
||||||
console.log(
|
console.log(
|
||||||
"Admin account automatically created for",
|
"Admin account automatically created for",
|
||||||
|
|
Loading…
Reference in New Issue