style: format ui/core

This commit is contained in:
Susmitha Girumala committed 2020-09-16 14:33:04 -04:00
1 parent e3366998c5
commit f4daaa45a9
165 files changed
+1075 -785

No files matched your search

+7 -8
View File
@@ -50,12 +50,11 @@ export default class PasswordAuthenticator extends BasePasswordAuthenticator {
* @override
*/
authenticate() {
return super.authenticate(...arguments)
.then(data => {
const token = data?.token;
if (token) this.addTokenToAuthorization(token);
return data;
});
return super.authenticate(...arguments).then((data) => {
const token = data?.token;
if (token) this.addTokenToAuthorization(token);
return data;
});
}
/**
@@ -78,8 +77,8 @@ export default class PasswordAuthenticator extends BasePasswordAuthenticator {
* @param {string} token
*/
addTokenToAuthorization(token) {
const adapterPrototype =
this.store.adapterFor('application').constructor.prototype;
const adapterPrototype = this.store.adapterFor('application').constructor
.prototype;
const headers = adapterPrototype?.headers;
if (!headers) adapterPrototype.headers = {};
adapterPrototype.headers.Authorization = null;