This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { storeJson } from '../fileModels/storeJson'
|
||||
import { sdk } from '../sdk'
|
||||
import { randomPassword } from '../utils'
|
||||
|
||||
export const taskSeedSpacedAuth = sdk.setupOnInit(async (effects) => {
|
||||
const existing = await storeJson.read((s) => s.spacedAuth).once()
|
||||
if (existing) return
|
||||
|
||||
await storeJson.merge(
|
||||
effects,
|
||||
{
|
||||
spacedAuth: {
|
||||
username: 'spaces',
|
||||
password: randomPassword(),
|
||||
},
|
||||
},
|
||||
{ allowWriteAfterConst: true },
|
||||
)
|
||||
})
|
||||
Reference in New Issue
Block a user