mirror of https://github.com/abpframework/abp.git
4 changed files with 0 additions and 69 deletions
@ -1,26 +0,0 @@ |
|||
import { ExtensibleObject } from './dtos'; |
|||
|
|||
export interface ChangePasswordInput { |
|||
currentPassword: string; |
|||
newPassword: string; |
|||
} |
|||
|
|||
export interface ProfileDto extends ExtensibleObject { |
|||
userName: string; |
|||
email: string; |
|||
name: string; |
|||
surname: string; |
|||
phoneNumber: string; |
|||
isExternal?: boolean; |
|||
hasPassword?: boolean; |
|||
emailConfirmed?: boolean; |
|||
phoneNumberConfirmed?: boolean; |
|||
} |
|||
|
|||
export interface UpdateProfileDto extends ExtensibleObject { |
|||
userName: string; |
|||
email: string; |
|||
name: string; |
|||
surname: string; |
|||
phoneNumber: string; |
|||
} |
|||
@ -1,41 +0,0 @@ |
|||
import { Injectable } from '@angular/core'; |
|||
import { ChangePasswordInput, ProfileDto, UpdateProfileDto } from '../models/profile'; |
|||
import { RestService } from './rest.service'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root', |
|||
}) |
|||
export class ProfileService { |
|||
apiName = 'AbpIdentity'; |
|||
|
|||
changePassword = (input: ChangePasswordInput, skipHandleError = false) => |
|||
this.restService.request<ChangePasswordInput, void>( |
|||
{ |
|||
method: 'POST', |
|||
url: '/api/identity/my-profile/change-password', |
|||
body: input, |
|||
}, |
|||
{ apiName: this.apiName, skipHandleError }, |
|||
); |
|||
|
|||
get = () => |
|||
this.restService.request<null, ProfileDto>( |
|||
{ |
|||
method: 'GET', |
|||
url: '/api/identity/my-profile', |
|||
}, |
|||
{ apiName: this.apiName }, |
|||
); |
|||
|
|||
update = (input: UpdateProfileDto) => |
|||
this.restService.request<UpdateProfileDto, ProfileDto>( |
|||
{ |
|||
method: 'PUT', |
|||
url: '/api/identity/my-profile', |
|||
body: input, |
|||
}, |
|||
{ apiName: this.apiName }, |
|||
); |
|||
|
|||
constructor(protected restService: RestService) {} |
|||
} |
|||
Loading…
Reference in new issue