1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

removed default space creation

This commit is contained in:
Harvey Kandola 2016-09-12 12:58:57 -07:00
parent 2154d01dcc
commit 686d74a041

View file

@ -1,11 +1,11 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -53,17 +53,11 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
}
// If model has any folders redirect to dashboard
if (model.length > 0) {
if (model.get('length') > 0) {
let folder = model[0];
Ember.set(this, 'folder', folder);
this.transitionTo('folders.folder', folder.get('id'), folder.get('slug'));
}
// has no folders, create default folder
return this.get('folderService').add({ name: "My Space" }).then((folder) => {
Ember.set(this, 'folder', folder);
this.transitionTo('folders.folder', folder.get('id'), folder.get('slug'));
});
}
//If folder route has params
@ -88,4 +82,4 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
controller.set('model', model);
controller.set('folder', this.folder);
}
});
});