Compare commits

...

4 commits

Author SHA1 Message Date
semantic-release-bot
6c1e4c3c80 chore(release): 1.6.0 [skip ci] 2021-06-13 21:07:17 +00:00
Luke Bennett
39dad3a037
feat: release 2021-06-13 22:06:28 +01:00
Luke Bennett
a9ed375f88
Merge branch 'stable' of github-me.com:LukeeeeBennett/ccash-client-js into stable 2021-06-13 22:06:13 +01:00
Luke Bennett
6fd7a91422
fix: correct password as body calls 2021-06-13 22:05:58 +01:00
3 changed files with 18 additions and 14 deletions

View file

@ -1,5 +1,17 @@
# 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.5.0",
"version": "1.6.0",
"description": "JS HTTP client for CCash",
"main": "./dist",
"publishConfig": {

View file

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