Browse Source

Merge branch 'develop/3.0' of https://github.com/ShvaykaD/thingsboard into ShvaykaD-develop/3.0

pull/2663/head
Igor Kulikov 7 years ago
parent
commit
8caa2a54f7
  1. 4
      ui-ngx/src/app/core/auth/auth.service.ts
  2. 2
      ui-ngx/src/app/modules/login/pages/login/create-password.component.ts

4
ui-ngx/src/app/core/auth/auth.service.ts

@ -127,8 +127,8 @@ export class AuthService {
{email}, defaultHttpOptions());
}
public activate(activateToken: string, password: string): Observable<LoginResponse> {
return this.http.post<LoginResponse>('/api/noauth/activate', {activateToken, password}, defaultHttpOptions()).pipe(
public activate(activateToken: string, password: string, sendActivationMail: boolean): Observable<LoginResponse> {
return this.http.post<LoginResponse>('/api/noauth/activate?sendActivationMail=' + sendActivationMail, {activateToken, password}, defaultHttpOptions()).pipe(
tap((loginResponse: LoginResponse) => {
this.setUserFromJwtToken(loginResponse.token, loginResponse.refreshToken, true);
}

2
ui-ngx/src/app/modules/login/pages/login/create-password.component.ts

@ -68,7 +68,7 @@ export class CreatePasswordComponent extends PageComponent implements OnInit, On
} else {
this.authService.activate(
this.activateToken,
this.createPassword.get('password').value).subscribe();
this.createPassword.get('password').value, true).subscribe();
}
}
}

Loading…
Cancel
Save