File tree Expand file tree Collapse file tree 4 files changed +10059
-1
lines changed Expand file tree Collapse file tree 4 files changed +10059
-1
lines changed Original file line number Diff line number Diff line change 1
- 8.9.1
1
+ 10
Original file line number Diff line number Diff line change @@ -3,13 +3,23 @@ import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
3
3
import env from 'trouble-maker-frontend/config/environment' ;
4
4
import { underscore } from '@ember/string' ;
5
5
import { inject as service } from '@ember/service' ;
6
+ import { computed } from '@ember/object' ;
6
7
7
8
export default DS . JSONAPIAdapter . extend ( DataAdapterMixin , {
8
9
session : service ( ) ,
10
+ // old and Deprecated method;
11
+ // TODO(abhishek): Should be remove it?
9
12
authorize ( xhr ) {
10
13
let { key } = this . get ( 'session.data.authenticated' )
11
14
xhr . setRequestHeader ( 'Authorization' , `Bearer ${ key } ` ) ;
12
15
} ,
16
+ // below works on newer ember-simple-auth
17
+ headers : computed ( 'session.data.authenticated' , function ( ) {
18
+ let { key } = this . get ( 'session.data.authenticated' )
19
+ return {
20
+ 'Authorization' : `Bearer ${ key } `
21
+ }
22
+ } ) ,
13
23
host : env . apiHost ,
14
24
namespace : 'api' ,
15
25
pathForType : function ( type ) {
Original file line number Diff line number Diff line change 60
60
"engines" : {
61
61
"node" : " 6.* || 8.* || >= 10.*"
62
62
},
63
+ "resolutions" : {
64
+ "whatwg-fetch" : " 3.3.1"
65
+ },
63
66
"dependencies" : {
64
67
"@coding-blocks/motley" : " ^0.2.3" ,
65
68
"babel-plugin-transform-object-rest-spread" : " ^6.26.0" ,
You can’t perform that action at this time.
0 commit comments