forked from sh-edraft.de/sh_discord_bot
[WIP] Fixed forgot password #70
This commit is contained in:
@@ -37,6 +37,7 @@ export class ForgetPasswordComponent implements OnInit {
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log('test');
|
||||
this.spinnerService.showSpinner();
|
||||
this.authService.isUserLoggedInAsync().then(result => {
|
||||
if (result) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<div class="login-form-wrapper">
|
||||
<div class="login-form">
|
||||
<form [formGroup]="loginForm">
|
||||
<h1>sh-edraft.de</h1>
|
||||
<h1>{{'auth.header' | translate}}</h1>
|
||||
<div class="input-field">
|
||||
<input type="email" pInputText formControlName="email" placeholder="{{'auth.login.e_mail' | translate}}" [ngClass]="{ 'invalid-feedback-input': submitted && (
|
||||
(loginForm.controls.email.errors && loginForm.controls.email.errors['required'] || authUserAtrErrors.email.required) ||
|
||||
|
@@ -102,8 +102,7 @@ export class AuthService {
|
||||
}
|
||||
|
||||
forgotPassword(email: string): Observable<unknown> {
|
||||
const emailJson = JSON.stringify(email);
|
||||
return this.http.post(`${this.appsettings.getApiURL()}/api/auth/forgot-password`, emailJson, {
|
||||
return this.http.post(`${this.appsettings.getApiURL()}/api/auth/forgot-password/${email}`, {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json'
|
||||
})
|
||||
@@ -111,8 +110,7 @@ export class AuthService {
|
||||
}
|
||||
|
||||
getEMailFromforgotPasswordId(id: string): Observable<EMailStringDTO> {
|
||||
const idJson = JSON.stringify(id);
|
||||
return this.http.post<EMailStringDTO>(`${this.appsettings.getApiURL()}/api/auth/confirm-forgot-password`, idJson, {
|
||||
return this.http.post<EMailStringDTO>(`${this.appsettings.getApiURL()}/api/auth/confirm-forgot-password/${id}`, {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json'
|
||||
})
|
||||
|
@@ -166,12 +166,12 @@ header {
|
||||
|
||||
.input-field-info-text {
|
||||
margin: 15px 0px;
|
||||
width: 240px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-form-submit {
|
||||
.login-form-submit-btn {
|
||||
width: 240px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -395,12 +395,12 @@ footer {
|
||||
|
||||
.input-field-info-text {
|
||||
margin: 15px 0px;
|
||||
width: 240px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-form-submit {
|
||||
.login-form-submit-btn {
|
||||
width: 240px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ footer {
|
||||
input,
|
||||
.p-password {
|
||||
height: 40px;
|
||||
width: 240px;
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user