File tree Expand file tree Collapse file tree 6 files changed +22
-17
lines changed
controllers/crate/settings Expand file tree Collapse file tree 6 files changed +22
-17
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ Router.map(function () {
1919 this . route ( 'reverse-dependencies' , { path : 'reverse_dependencies' } ) ;
2020
2121 this . route ( 'owners' ) ;
22- this . route ( 'settings' ) ;
22+ this . route ( 'settings' , function ( ) { } ) ;
2323 this . route ( 'delete' ) ;
2424
2525 // Well-known routes
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import AuthenticatedRoute from '../-authenticated-route';
55export default class SettingsRoute extends AuthenticatedRoute {
66 @service router ;
77 @service session ;
8- @service store ;
98
109 async beforeModel ( transition ) {
1110 await super . beforeModel ( ...arguments ) ;
@@ -20,19 +19,4 @@ export default class SettingsRoute extends AuthenticatedRoute {
2019 } ) ;
2120 }
2221 }
23-
24- async model ( ) {
25- let crate = this . modelFor ( 'crate' ) ;
26-
27- let githubConfigs = await this . store . query ( 'trustpub-github-config' , { crate : crate . name } ) ;
28-
29- return { crate, githubConfigs } ;
30- }
31-
32- setupController ( controller , { crate, githubConfigs } ) {
33- super . setupController ( ...arguments ) ;
34-
35- controller . set ( 'crate' , crate ) ;
36- controller . set ( 'githubConfigs' , githubConfigs ) ;
37- }
3822}
Original file line number Diff line number Diff line change 1+ import Route from '@ember/routing/route' ;
2+ import { service } from '@ember/service' ;
3+
4+ export default class SettingsIndexRoute extends Route {
5+ @service store ;
6+
7+ async model ( ) {
8+ let crate = this . modelFor ( 'crate' ) ;
9+
10+ let githubConfigs = await this . store . query ( 'trustpub-github-config' , { crate : crate . name } ) ;
11+
12+ return { crate, githubConfigs } ;
13+ }
14+
15+ setupController ( controller , { crate, githubConfigs } ) {
16+ super . setupController ( ...arguments ) ;
17+
18+ controller . set ( 'crate' , crate ) ;
19+ controller . set ( 'githubConfigs' , githubConfigs ) ;
20+ }
21+ }
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments