Skip to content

Commit 4d239e2

Browse files
package 22
1 parent a717f98 commit 4d239e2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "sidedrawer-javascript-sdk",
33
"author": "Juan Matias Doder",
44
"description": "This is a sdk of SideDrawer to help to build development quickly.",
5-
"version": "0.1.21",
5+
"version": "0.1.22",
66
"license": "MIT",
77
"main": "dist/index.js",
88
"typings": "dist/index.d.ts",

src/services/account-service.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default class AccountSevice extends BaseService implements IAccountSevice
6161
}
6262

6363
updateSettings = async (account_id: string, settings: Settings): Promise<AxiosResponse<Settings>> => {
64-
return this.put<Settings>(`/accounts/account-id/${account_id}/settings`, settings);
64+
return this.put<Settings>(`accounts/account-id/${account_id}/settings`, settings);
6565
}
6666

6767
update = async (account_id: string, account: Account): Promise<AxiosResponse<Account>> => {
@@ -76,19 +76,19 @@ export default class AccountSevice extends BaseService implements IAccountSevice
7676
create = async (account: Account, brandCode: string, referralCode?: string, invitationCode?: string): Promise<AxiosResponse<{ id: string }>> => {
7777

7878
let body = {};
79-
if (!!referralCode) {
79+
if (!!referralCode)
8080
body = { ...body, referralCode };
81-
}
82-
if (!!invitationCode) {
81+
82+
if (!!invitationCode)
8383
body = { ...body, invitationCode };
84-
}
84+
8585
body = { ...body, ...account };
86-
return this.post<{ id: string }>(`/accounts?brandCode=${brandCode}`, body);
86+
return this.post<{ id: string }>(`accounts?brandCode=${brandCode}`, body);
8787
}
8888

8989
remove = async (account_id: string): Promise<AxiosResponse<any>> => {
9090

91-
return this.delete(`/accounts/account-id/${account_id}`);
91+
return this.delete(`accounts/account-id/${account_id}`);
9292
};
9393

9494

0 commit comments

Comments
 (0)