style: format addons/api

This commit is contained in:
Susmitha Girumala committed 2020-09-16 14:29:02 -04:00
1 parent e2610d6a90
commit ec870acba8
62 files changed
+590 -521

No files matched your search

+3 -4
View File
@@ -35,13 +35,12 @@ function payloadIsBlank(adapterPayload) {
* @return {object}
*/
function prenormalizeArrayResponse(response) {
return payloadIsBlank(response) ? {items: []} : response;
return payloadIsBlank(response) ? { items: [] } : response;
}
export default class ApplicationAdapter extends RESTAdapter.extend(
AdapterBuildURLMixin
) {
// =attributes
/**
@@ -68,7 +67,7 @@ export default class ApplicationAdapter extends RESTAdapter.extend(
* @param {object} snapshot
* @return {string}
*/
urlSuffix(modelName, id, snapshot={}) {
urlSuffix(modelName, id, snapshot = {}) {
const method = getWithDefault(snapshot, 'adapterOptions.method', '');
return method ? `:${method}` : '';
}
@@ -205,7 +204,7 @@ export default class ApplicationAdapter extends RESTAdapter.extend(
normalizeErrorResponse(/*status, headers, payload*/) {
const errors = super.normalizeErrorResponse(...arguments);
if (isArray(errors)) {
errors.forEach(error => {
errors.forEach((error) => {
switch (Number(error.status)) {
case 401:
error.isUnauthenticated = true;