Compare commits

..

No commits in common. "stable" and "v1.5.0" have entirely different histories.

3 changed files with 14 additions and 18 deletions

View file

@ -1,17 +1,5 @@
# CHANGELOG
# [1.6.0](https://github.com/LukeeeeBennett/ccash-client-js/compare/v1.5.0...v1.6.0) (2021-06-13)
### Bug Fixes
* correct password as body calls ([6fd7a91](https://github.com/LukeeeeBennett/ccash-client-js/commit/6fd7a91422c74f5b0c2bea951db160e3d6bb4dfc))
### Features
* release ([39dad3a](https://github.com/LukeeeeBennett/ccash-client-js/commit/39dad3a037c6151915288401f68ecdad2b2ac0f4))
# [1.5.0](https://github.com/LukeeeeBennett/ccash-client-js/compare/v1.4.0...v1.5.0) (2021-06-13)

View file

@ -1,6 +1,6 @@
{
"name": "ccash-client-js",
"version": "1.6.0",
"version": "1.5.0",
"description": "JS HTTP client for CCash",
"main": "./dist",
"publishConfig": {

View file

@ -56,7 +56,11 @@ export class CCashClient implements ICCashClient {
changePassword(user: string, pass: string, newPass: string): Promise<User> {
return this.http
.patch(`/${user}/pass/change`, newPass, { headers: { Password: pass } })
.patch(
`/${user}/pass/change`,
{ password: newPass },
{ headers: { Password: pass } }
)
.then(
(response) =>
this.handleError(response) || this.serialize(User, { user })
@ -118,10 +122,14 @@ export class CCashClient implements ICCashClient {
initialBalance: number
): Promise<User> {
return this.http
.post(`/user/${user}`, initialPass, {
headers: { Password: pass },
params: { init_bal: initialBalance },
})
.post(
`/user/${user}`,
{ password: initialPass },
{
headers: { Password: pass },
params: { init_bal: initialBalance },
}
)
.then(
(response) =>
this.handleError(response) || this.serialize(User, { user })