diff --git a/ghost/admin/app/routes/setup.js b/ghost/admin/app/routes/setup.js index aeab8703b1..4f11e75ca2 100644 --- a/ghost/admin/app/routes/setup.js +++ b/ghost/admin/app/routes/setup.js @@ -31,10 +31,23 @@ export default Route.extend(styleBody, { // If user is not logged in, check the state of the setup process via the API return this.get('ajax').request(authUrl) .then((result) => { - let setup = result.setup[0].status; + let [setup] = result.setup; - if (setup) { + if (setup.status) { return this.transitionTo('signin'); + } else { + let controller = this.controllerFor('setup/two'); + if (setup.title) { + controller.set('blogTitle', setup.title.replace(/'/gim, '\'')); + } + + if (setup.name) { + controller.set('name', setup.name.replace(/'/gim, '\'')); + } + + if (setup.email) { + controller.set('email', setup.email); + } } }); },