Skip to content

Commit 3f7e74a

Browse files
committed
Refactor API request handling in Xero Accounting API. Changed the make-an-api-call method to directly return the axios call, simplifying the code and improving readability by removing unnecessary variable assignments.
1 parent ef36669 commit 3f7e74a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

components/xero_accounting_api/xero_accounting_api.app.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,15 @@ export default {
104104
headers,
105105
...opts
106106
}) {
107-
const config = {
107+
return axios($, {
108108
url: `${BASE_URL}/api.xro/2.0${path}`,
109109
headers: this.getHeader({
110110
tenantId,
111111
modifiedSince,
112112
headers,
113113
}),
114114
...opts,
115-
};
116-
console.log("config: ", config);
117-
return axios($, config);
115+
});
118116
},
119117
getTenantConnections() {
120118
return this._makeRequest({

0 commit comments

Comments
 (0)