Skip to content

Commit

Permalink
UPDATE: email field removed from forget password page
Browse files Browse the repository at this point in the history
  • Loading branch information
kumar-09 committed Aug 3, 2024
1 parent 1323798 commit 0520107
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/app/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,11 @@ export class AuthService {
return this.roll_no;
}

forgetPassword(username:any, email: any) {
forgetPassword(username:any) {
let url = this.baseurl.concat("/api/change_password");
return this.http.put<any>(url, {
requestType: 'Password_reset',
username: username,
email: email
username: username
}).pipe(
catchError(err => {
// Handle errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@
<img class="img2-fluid" src="assets/images/document-sign.png" alt="document-sign-img" />
</div>
<div class="form">
<form (ngSubmit)="onForgetSubmit(username.value, email.value)">
<form (ngSubmit)="onForgetSubmit(username.value)">
<div class="inputbox1">
<input type="text" name="userID" class="form-control" id="userID" placeholder="UserID" required #username />
</div>
<div class="inputbox2">
<input type="email" name="email" class="form-control" id="email" placeholder="email" style="margin-top: 4%;" required #email />
</div>
<a [routerLink]="['/mess-manager']">Back to Login</a>
<br/>
<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export class ForgetPasswordComponent implements OnInit {
});
}

onForgetSubmit(username:any, email:any) {
this.authService.forgetPassword(username, email).subscribe(
onForgetSubmit(username:any) {
this.authService.forgetPassword(username).subscribe(
(res) => {
console.log(res);
this.success = true;
Expand Down

0 comments on commit 0520107

Please sign in to comment.