Skip to content

Commit 0cb4413

Browse files
committed
package maintainence; use node 10
1 parent 4e265f8 commit 0cb4413

File tree

4 files changed

+10059
-1
lines changed

4 files changed

+10059
-1
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.9.1
1+
10

app/adapters/application.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,23 @@ import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
33
import env from 'trouble-maker-frontend/config/environment';
44
import { underscore } from '@ember/string';
55
import { inject as service } from '@ember/service';
6+
import { computed } from '@ember/object';
67

78
export default DS.JSONAPIAdapter.extend(DataAdapterMixin, {
89
session: service(),
10+
// old and Deprecated method;
11+
// TODO(abhishek): Should be remove it?
912
authorize (xhr) {
1013
let { key } = this.get('session.data.authenticated')
1114
xhr.setRequestHeader('Authorization', `Bearer ${key}`);
1215
},
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+
}),
1323
host: env.apiHost,
1424
namespace: 'api',
1525
pathForType: function (type) {

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
"engines": {
6161
"node": "6.* || 8.* || >= 10.*"
6262
},
63+
"resolutions": {
64+
"whatwg-fetch": "3.3.1"
65+
},
6366
"dependencies": {
6467
"@coding-blocks/motley": "^0.2.3",
6568
"babel-plugin-transform-object-rest-spread": "^6.26.0",

0 commit comments

Comments
 (0)