Add disconnect route
This commit is contained in:
@@ -9,6 +9,7 @@ const Router = EmberRouter.extend({
|
||||
Router.map(function() {
|
||||
this.route('inspect');
|
||||
this.route('connect');
|
||||
this.route('disconnect');
|
||||
});
|
||||
|
||||
export default Router;
|
||||
|
||||
13
app/routes/disconnect.js
Normal file
13
app/routes/disconnect.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default Route.extend({
|
||||
|
||||
storage: service(),
|
||||
|
||||
beforeModel() {
|
||||
this.get('storage.rs').disconnect();
|
||||
this.transitionTo('connect');
|
||||
}
|
||||
|
||||
});
|
||||
1
app/templates/disconnect.hbs
Normal file
1
app/templates/disconnect.hbs
Normal file
@@ -0,0 +1 @@
|
||||
{{outlet}}
|
||||
Reference in New Issue
Block a user