File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change
1
+ import ApplicationAdapter from './application' ;
2
+
3
+ export default ApplicationAdapter . extend ( {
4
+ queryRecord ( store , type , query ) {
5
+ let url = this . urlForFindRecord ( query . team_id , 'team' ) ;
6
+ return this . ajax ( url , 'GET' ) ;
7
+ } ,
8
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import ApplicationAdapter from './application' ;
2
+
3
+ export default ApplicationAdapter . extend ( {
4
+ queryRecord ( store , type , query ) {
5
+ let url = this . urlForFindRecord ( query . user_id , 'user' ) ;
6
+ return this . ajax ( url , 'GET' ) ;
7
+ } ,
8
+ } ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default Ember.Route.extend({
19
19
model ( params ) {
20
20
const { team_id } = params ;
21
21
22
- return this . store . find ( 'team' , team_id ) . then (
22
+ return this . store . queryRecord ( 'team' , { team_id } ) . then (
23
23
( team ) => {
24
24
params . team_id = team . get ( 'id' ) ;
25
25
return Ember . RSVP . hash ( {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export default Ember.Route.extend({
12
12
13
13
model ( params ) {
14
14
const { user_id } = params ;
15
- return this . store . find ( 'user' , user_id ) . then (
15
+ return this . store . queryRecord ( 'user' , { user_id } ) . then (
16
16
( user ) => {
17
17
params . user_id = user . get ( 'id' ) ;
18
18
return Ember . RSVP . hash ( {
You can’t perform that action at this time.
0 commit comments