Skip to content

Commit

Permalink
fix: POST, PATCH, DELETE logging breaking calls
Browse files Browse the repository at this point in the history
  • Loading branch information
UnderKoen committed Apr 20, 2023
1 parent 607e171 commit e10e5fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/example.js
Expand Up @@ -9,6 +9,6 @@ moneybird.instance.setOptions({
const administrations = await moneybird.instance.administrations();
for (const administration of administrations) {
const contacts = await administration.contacts();
console.log(contacts);
// console.log(administration, contacts);
}
})().catch(console.log);
6 changes: 3 additions & 3 deletions src/moneybird.ts
Expand Up @@ -86,7 +86,7 @@ export class Moneybird implements HTTP {
data: unknown,
options: GaxiosOptions = {}
): Promise<T> {
debug("moneybird").log(`POST ${url}`);
debug("moneybird")(`POST ${url}`);

const response = await this.client.request<T>({
method: "POST",
Expand All @@ -111,7 +111,7 @@ export class Moneybird implements HTTP {
data: unknown,
options: GaxiosOptions = {}
): Promise<T> {
debug("moneybird").log(`PATCH ${url}`);
debug("moneybird")(`PATCH ${url}`);

const response = await this.client.request<T>({
method: "PATCH",
Expand All @@ -131,7 +131,7 @@ export class Moneybird implements HTTP {
* @param options The options for the request
*/
public async DELETE<T>(url: string, options: GaxiosOptions = {}): Promise<T> {
debug("moneybird").log(`DELETE ${url}`);
debug("moneybird")(`DELETE ${url}`);

const response = await this.client.request<T>({
method: "DELETE",
Expand Down

0 comments on commit e10e5fc

Please sign in to comment.