mirror of
https://github.com/Expand-sys/ccash-client-js
synced 2026-03-22 12:27:09 +11:00
Compare commits
No commits in common. "stable" and "v1.5.0" have entirely different histories.
3 changed files with 14 additions and 18 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
|
@ -1,17 +1,5 @@
|
||||||
# CHANGELOG
|
# 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)
|
# [1.5.0](https://github.com/LukeeeeBennett/ccash-client-js/compare/v1.4.0...v1.5.0) (2021-06-13)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ccash-client-js",
|
"name": "ccash-client-js",
|
||||||
"version": "1.6.0",
|
"version": "1.5.0",
|
||||||
"description": "JS HTTP client for CCash",
|
"description": "JS HTTP client for CCash",
|
||||||
"main": "./dist",
|
"main": "./dist",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,11 @@ export class CCashClient implements ICCashClient {
|
||||||
|
|
||||||
changePassword(user: string, pass: string, newPass: string): Promise<User> {
|
changePassword(user: string, pass: string, newPass: string): Promise<User> {
|
||||||
return this.http
|
return this.http
|
||||||
.patch(`/${user}/pass/change`, newPass, { headers: { Password: pass } })
|
.patch(
|
||||||
|
`/${user}/pass/change`,
|
||||||
|
{ password: newPass },
|
||||||
|
{ headers: { Password: pass } }
|
||||||
|
)
|
||||||
.then(
|
.then(
|
||||||
(response) =>
|
(response) =>
|
||||||
this.handleError(response) || this.serialize(User, { user })
|
this.handleError(response) || this.serialize(User, { user })
|
||||||
|
|
@ -118,10 +122,14 @@ export class CCashClient implements ICCashClient {
|
||||||
initialBalance: number
|
initialBalance: number
|
||||||
): Promise<User> {
|
): Promise<User> {
|
||||||
return this.http
|
return this.http
|
||||||
.post(`/user/${user}`, initialPass, {
|
.post(
|
||||||
headers: { Password: pass },
|
`/user/${user}`,
|
||||||
params: { init_bal: initialBalance },
|
{ password: initialPass },
|
||||||
})
|
{
|
||||||
|
headers: { Password: pass },
|
||||||
|
params: { init_bal: initialBalance },
|
||||||
|
}
|
||||||
|
)
|
||||||
.then(
|
.then(
|
||||||
(response) =>
|
(response) =>
|
||||||
this.handleError(response) || this.serialize(User, { user })
|
this.handleError(response) || this.serialize(User, { user })
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue