Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Commit 76b53a0

Browse files
committed
added update self accoutn funixprod
1 parent a9d9a07 commit 76b53a0

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@funixproductions/angular-core",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"description": "Package used in all FunixProductions Angular projects",
55
"scripts": {
66
"ng": "ng",

projects/funixproductions-requests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@funixproductions/funixproductions-requests",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"description": "Package used in all FunixProductions Angular projects",
55
"peerDependencies": {
66
"@angular/common": "^17.1.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import {UserDTO} from "../user-dto";
2+
3+
export class UserUpdateAccountDto extends UserDTO {
4+
oldPassword?: string;
5+
newPassword?: string;
6+
newPasswordConfirmation?: string;
7+
}

projects/funixproductions-requests/src/lib/services/funixproductions-api/user/services/user-auth-service.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {Paginated} from "../../../core/dtos/paginated";
1010
import {environmentDev} from "../../../../../environments/environment-dev";
1111
import {UserPasswordResetRequestDTO} from "../dtos/requests/user-password-reset-request-dto";
1212
import {UserPasswordResetDTO} from "../dtos/requests/user-password-reset-dto";
13+
import {UserUpdateAccountDto} from "../dtos/requests/user-update-account-dto";
1314

1415
export class UserAuthService extends FunixprodHttpClient {
1516

@@ -109,4 +110,13 @@ export class UserAuthService extends FunixprodHttpClient {
109110
);
110111
}
111112

113+
updateAccount(request: UserUpdateAccountDto): Observable<UserDTO> {
114+
return this.httpClient.patch<UserDTO>(this.url, request, {headers: super.getHeaders()})
115+
.pipe(
116+
catchError((error: HttpErrorResponse) => {
117+
return throwError(() => this.buildErrorDto(error));
118+
})
119+
);
120+
}
121+
112122
}

projects/funixproductions-requests/src/public-api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export * from './lib/services/funixproductions-api/user/dtos/requests/user-login
4242
export * from './lib/services/funixproductions-api/user/dtos/requests/user-password-reset-dto';
4343
export * from './lib/services/funixproductions-api/user/dtos/requests/user-secrets-dto';
4444
export * from './lib/services/funixproductions-api/user/dtos/requests/user-password-reset-request-dto';
45+
export * from './lib/services/funixproductions-api/user/dtos/requests/user-update-account-dto';
4546
export * from './lib/services/funixproductions-api/user/dtos/user-dto';
4647
export * from './lib/services/funixproductions-api/user/dtos/user-token-dto';
4748
export * from './lib/services/funixproductions-api/twitch/services/twitch-auth-service';

0 commit comments

Comments
 (0)