ember-auth-source 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/dist/ember-auth.js +6 -9
  2. metadata +2 -2
data/dist/ember-auth.js CHANGED
@@ -204,7 +204,7 @@
204
204
  }
205
205
  },
206
206
  ajax: function(settings) {
207
- var data, def, e, token, _base, _base1, _base2, _base3, _name, _name1, _name2, _name3;
207
+ var data, def, e, token, _base, _base1, _base2, _name, _name1, _name2;
208
208
 
209
209
  if (settings == null) {
210
210
  settings = {};
@@ -219,18 +219,15 @@
219
219
  if (token = this.get('authToken')) {
220
220
  switch (Auth.Config.get('requestTokenLocation')) {
221
221
  case 'param':
222
+ settings.data || (settings.data = {});
222
223
  switch (typeof settings.data) {
223
- case 'undefined':
224
- settings.data = {};
225
- (_base = settings.data)[_name = Auth.Config.get('tokenKey')] || (_base[_name] = this.get('authToken'));
226
- break;
227
224
  case 'object':
228
- (_base1 = settings.data)[_name1 = Auth.Config.get('tokenKey')] || (_base1[_name1] = this.get('authToken'));
225
+ (_base = settings.data)[_name = Auth.Config.get('tokenKey')] || (_base[_name] = this.get('authToken'));
229
226
  break;
230
227
  case 'string':
231
228
  try {
232
229
  data = JSON.parse(settings.data);
233
- data[_name2 = Auth.Config.get('tokenKey')] || (data[_name2] = this.get('authToken'));
230
+ data[_name1 = Auth.Config.get('tokenKey')] || (data[_name1] = this.get('authToken'));
234
231
  settings.data = JSON.stringify(data);
235
232
  } catch (_error) {
236
233
  e = _error;
@@ -239,11 +236,11 @@
239
236
  break;
240
237
  case 'authHeader':
241
238
  settings.headers || (settings.headers = {});
242
- (_base2 = settings.headers)['Authorization'] || (_base2['Authorization'] = "" + (Auth.Config.get('requestHeaderKey')) + " " + (this.get('authToken')));
239
+ (_base1 = settings.headers)['Authorization'] || (_base1['Authorization'] = "" + (Auth.Config.get('requestHeaderKey')) + " " + (this.get('authToken')));
243
240
  break;
244
241
  case 'customHeader':
245
242
  settings.headers || (settings.headers = {});
246
- (_base3 = settings.headers)[_name3 = Auth.Config.get('requestHeaderKey')] || (_base3[_name3] = this.get('authToken'));
243
+ (_base2 = settings.headers)[_name2 = Auth.Config.get('requestHeaderKey')] || (_base2[_name2] = this.get('authToken'));
247
244
  }
248
245
  }
249
246
  return jQuery.ajax(settings);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-auth-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -51,7 +51,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
51
  version: '0'
52
52
  segments:
53
53
  - 0
54
- hash: -829773711
54
+ hash: -92302963
55
55
  required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements: