lint ✨
This commit is contained in:
parent
7d09bd8d70
commit
42e0b3c1f9
|
@ -41,7 +41,8 @@
|
|||
<Input
|
||||
label="password"
|
||||
type="password"
|
||||
bind:value={adminUser.password} />
|
||||
bind:value={adminUser.password}
|
||||
/>
|
||||
<Button cta on:click={save}>Create super admin user</Button>
|
||||
</Layout>
|
||||
</div>
|
||||
|
|
|
@ -32,13 +32,15 @@
|
|||
<Item
|
||||
external
|
||||
href="https://github.com/Budibase/budibase/discussions"
|
||||
icon="PeopleGroup">
|
||||
icon="PeopleGroup"
|
||||
>
|
||||
Community
|
||||
</Item>
|
||||
<Item
|
||||
external
|
||||
href="https://github.com/Budibase/budibase/issues/new/choose"
|
||||
icon="Bug">
|
||||
icon="Bug"
|
||||
>
|
||||
Raise an issue
|
||||
</Item>
|
||||
</Navigation>
|
||||
|
|
|
@ -11,15 +11,18 @@ export function createAdminStore() {
|
|||
|
||||
const onboardingSteps = Object.keys(json)
|
||||
|
||||
const stepsComplete = onboardingSteps.reduce((score, step) => score + Number(!!json[step]), 0)
|
||||
const stepsComplete = onboardingSteps.reduce(
|
||||
(score, step) => score + Number(!!json[step]),
|
||||
0
|
||||
)
|
||||
|
||||
set({
|
||||
checklist: json,
|
||||
onboardingProgress: stepsComplete / onboardingSteps.length * 100
|
||||
onboardingProgress: (stepsComplete / onboardingSteps.length) * 100,
|
||||
})
|
||||
} catch (err) {
|
||||
set({
|
||||
checklist: null
|
||||
checklist: null,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,13 +104,14 @@ exports.destroy = async function (ctx) {
|
|||
}
|
||||
}
|
||||
|
||||
exports.configChecklist = async function(ctx) {
|
||||
exports.configChecklist = async function (ctx) {
|
||||
const db = new CouchDB(GLOBAL_DB)
|
||||
|
||||
try {
|
||||
// TODO: Watch get started video
|
||||
|
||||
// Apps exist
|
||||
let allDbs
|
||||
if (env.COUCH_DB_URL) {
|
||||
allDbs = await (await fetch(`${env.COUCH_DB_URL}/_all_dbs`)).json()
|
||||
} else {
|
||||
|
@ -120,7 +121,7 @@ exports.configChecklist = async function(ctx) {
|
|||
|
||||
// They have set up SMTP
|
||||
const smtpConfig = await determineScopedConfig(db, {
|
||||
type: Configs.SMTP
|
||||
type: Configs.SMTP,
|
||||
})
|
||||
|
||||
// They have set up an admin user
|
||||
|
@ -131,10 +132,10 @@ exports.configChecklist = async function(ctx) {
|
|||
)
|
||||
const adminUser = users.rows.some(row => row.doc.admin)
|
||||
|
||||
ctx.body = {
|
||||
ctx.body = {
|
||||
apps: appDbNames.length,
|
||||
smtp: !!smtpConfig,
|
||||
adminUser
|
||||
adminUser,
|
||||
}
|
||||
} catch (err) {
|
||||
ctx.throw(err.status, err)
|
||||
|
|
|
@ -7,8 +7,6 @@ const {
|
|||
const { hash, getGlobalUserByEmail } = require("@budibase/auth").utils
|
||||
const { UserStatus } = require("../../../constants")
|
||||
|
||||
const FIRST_USER_EMAIL = "test@test.com"
|
||||
const FIRST_USER_PASSWORD = "test"
|
||||
const GLOBAL_DB = StaticDatabases.GLOBAL.name
|
||||
|
||||
exports.save = async ctx => {
|
||||
|
|
|
@ -162,7 +162,7 @@ class TestConfiguration {
|
|||
await this._req(
|
||||
{
|
||||
email: "testuser@test.com",
|
||||
password: "test@test.com"
|
||||
password: "test@test.com",
|
||||
},
|
||||
null,
|
||||
controllers.users.adminUser
|
||||
|
|
Loading…
Reference in New Issue