mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 08:25:06 +03:00
Pre-populate setup values from config
no issue - Check for title, user_name and user_email in the top level of config. - If they exist, return them as part of the setup check, so that the setup screen can be prepopulated
This commit is contained in:
parent
7cd6c786f9
commit
5d3b32a926
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user