Skip to content

Commit

Permalink
Create system template on onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
ebb-tide committed Mar 12, 2019
1 parent 947aade commit f005026
Show file tree
Hide file tree
Showing 2 changed files with 1,167 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/src/onboarding/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import _ from 'lodash'
// Constants
import {StepStatus} from 'src/clockface/constants/wizard'
import {SetupSuccess, SetupError} from 'src/shared/copy/notifications'
import {systemTemplate} from 'src/organizations/constants/index'

// Actions
import {notify} from 'src/shared/actions/notifications'
Expand Down Expand Up @@ -82,6 +83,9 @@ export const setupAdmin = (params: ISetupParams) => async (
const {username, password} = params

await client.auth.signin(username, password)

await client.templates.create({...systemTemplate(params.bucket), orgID})

dispatch(notify(SetupSuccess))
dispatch(setStepStatus(1, StepStatus.Complete))
return true
Expand Down
Loading

0 comments on commit f005026

Please sign in to comment.